* fpc_popobjectstack: clean up.

git-svn-id: trunk@26836 -
This commit is contained in:
sergei 2014-02-22 14:44:29 +00:00
parent 435dec656f
commit 749ff6b19d

View File

@ -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);