mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 00:59:08 +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;
|
function fpc_PopObjectStack : TObject;[Public, Alias : 'FPC_POPOBJECTSTACK']; compilerproc;
|
||||||
var
|
var
|
||||||
hp,_ExceptObjectStack : PExceptObject;
|
hp : PExceptObject;
|
||||||
begin
|
begin
|
||||||
{$ifdef excdebug}
|
{$ifdef excdebug}
|
||||||
writeln ('In PopObjectstack');
|
writeln ('In PopObjectstack');
|
||||||
{$endif}
|
{$endif}
|
||||||
_ExceptObjectStack:=ExceptObjectStack;
|
hp:=ExceptObjectStack;
|
||||||
If _ExceptObjectStack=nil then
|
if hp=nil then
|
||||||
begin
|
begin
|
||||||
{$ifdef excdebug}
|
{$ifdef excdebug}
|
||||||
writeln ('At end of ExceptionObjectStack');
|
writeln ('At end of ExceptionObjectStack');
|
||||||
@ -273,13 +273,11 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
{ we need to return the exception object to dispose it }
|
{ we need to return the exception object to dispose it }
|
||||||
if _ExceptObjectStack^.refcount = 0 then begin
|
if hp^.refcount = 0 then
|
||||||
fpc_PopObjectStack:=_ExceptObjectStack^.FObject;
|
fpc_PopObjectStack:=hp^.FObject
|
||||||
end else begin
|
else
|
||||||
fpc_PopObjectStack:=nil;
|
fpc_PopObjectStack:=nil;
|
||||||
end;
|
ExceptObjectStack:=hp^.next;
|
||||||
hp:=_ExceptObjectStack;
|
|
||||||
ExceptObjectStack:=_ExceptObjectStack^.next;
|
|
||||||
if assigned(hp^.frames) then
|
if assigned(hp^.frames) then
|
||||||
freemem(hp^.frames);
|
freemem(hp^.frames);
|
||||||
dispose(hp);
|
dispose(hp);
|
||||||
|
Loading…
Reference in New Issue
Block a user