mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 10:49:33 +01:00
* also process all subnodes of try-except and try-finally in
foreachnode(static) (fixes first example of mantis #9076) git-svn-id: trunk@7671 -
This commit is contained in:
parent
ba95cc22ee
commit
62b3b307e0
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -8295,6 +8295,8 @@ tests/webtbs/tw8950.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8975.pp svneol=native#text/plain
|
||||
tests/webtbs/tw8975a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9054.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9076.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9076a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9085.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1873.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1883.pp svneol=native#text/plain
|
||||
|
||||
@ -125,7 +125,7 @@ implementation
|
||||
result := foreachnode(tcallnode(n).methodpointer,f,arg) or result;
|
||||
result := foreachnode(tcallnode(n).methodpointerdone,f,arg) or result;
|
||||
end;
|
||||
ifn, whilerepeatn, forn:
|
||||
ifn, whilerepeatn, forn, tryexceptn, tryfinallyn:
|
||||
begin
|
||||
{ not in one statement, won't work because of b- }
|
||||
result := foreachnode(tloopnode(n).t1,f,arg) or result;
|
||||
@ -173,7 +173,7 @@ implementation
|
||||
result := foreachnodestatic(procmethod,tcallnode(n).methodpointer,f,arg) or result;
|
||||
result := foreachnodestatic(procmethod,tcallnode(n).methodpointerdone,f,arg) or result;
|
||||
end;
|
||||
ifn, whilerepeatn, forn:
|
||||
ifn, whilerepeatn, forn, tryexceptn, tryfinallyn:
|
||||
begin
|
||||
{ not in one statement, won't work because of b- }
|
||||
result := foreachnodestatic(procmethod,tloopnode(n).t1,f,arg) or result;
|
||||
|
||||
29
tests/webtbs/tw9076.pp
Normal file
29
tests/webtbs/tw9076.pp
Normal file
@ -0,0 +1,29 @@
|
||||
{ %norun }
|
||||
|
||||
unit tw9076;
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
interface
|
||||
|
||||
type
|
||||
pfdset = pointer;
|
||||
|
||||
function __Select(N: Longint; ReadFds: PFDSet; WriteFds: PFDSet;
|
||||
ExceptFds: PFDSet): Longint; inline;
|
||||
|
||||
implementation
|
||||
|
||||
function __Select(N: Longint; ReadFds: PFDSet; WriteFds: PFDSet;
|
||||
ExceptFds: PFDSet): Longint;
|
||||
begin
|
||||
try
|
||||
result := 2
|
||||
except
|
||||
Result := -1
|
||||
end
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
10
tests/webtbs/tw9076a.pp
Normal file
10
tests/webtbs/tw9076a.pp
Normal file
@ -0,0 +1,10 @@
|
||||
{ %norun }
|
||||
|
||||
program chatserver;
|
||||
|
||||
uses tw9076;
|
||||
|
||||
begin
|
||||
__Select(0, nil, nil, nil)
|
||||
end.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user