mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 00:42:06 +02:00
* fpc_popobjectstack: clean up.
git-svn-id: trunk@26836 -
This commit is contained in:
parent
435dec656f
commit
749ff6b19d
@ -257,13 +257,13 @@ end;
|
||||
|
||||
function fpc_PopObjectStack : TObject;[Public, Alias : 'FPC_POPOBJECTSTACK']; compilerproc;
|
||||
var
|
||||
hp,_ExceptObjectStack : PExceptObject;
|
||||
hp : PExceptObject;
|
||||
begin
|
||||
{$ifdef excdebug}
|
||||
writeln ('In PopObjectstack');
|
||||
{$endif}
|
||||
_ExceptObjectStack:=ExceptObjectStack;
|
||||
If _ExceptObjectStack=nil then
|
||||
hp:=ExceptObjectStack;
|
||||
if hp=nil then
|
||||
begin
|
||||
{$ifdef excdebug}
|
||||
writeln ('At end of ExceptionObjectStack');
|
||||
@ -273,13 +273,11 @@ begin
|
||||
else
|
||||
begin
|
||||
{ we need to return the exception object to dispose it }
|
||||
if _ExceptObjectStack^.refcount = 0 then begin
|
||||
fpc_PopObjectStack:=_ExceptObjectStack^.FObject;
|
||||
end else begin
|
||||
if hp^.refcount = 0 then
|
||||
fpc_PopObjectStack:=hp^.FObject
|
||||
else
|
||||
fpc_PopObjectStack:=nil;
|
||||
end;
|
||||
hp:=_ExceptObjectStack;
|
||||
ExceptObjectStack:=_ExceptObjectStack^.next;
|
||||
ExceptObjectStack:=hp^.next;
|
||||
if assigned(hp^.frames) then
|
||||
freemem(hp^.frames);
|
||||
dispose(hp);
|
||||
|
Loading…
Reference in New Issue
Block a user