mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 09:01:33 +02:00
threadvars change location when a thread is started, use external variable
git-svn-id: trunk@6434 -
This commit is contained in:
parent
b62eab6b71
commit
8a7395aa69
@ -222,6 +222,7 @@ implementation
|
|||||||
|
|
||||||
var
|
var
|
||||||
InterfaceFinalizationHandlers: TList;
|
InterfaceFinalizationHandlers: TList;
|
||||||
|
DebugTextAlloced: boolean;
|
||||||
DebugText: ^Text;
|
DebugText: ^Text;
|
||||||
|
|
||||||
|
|
||||||
@ -813,6 +814,7 @@ begin
|
|||||||
(DirectoryExists(ExtractFileDir(DebugFileName))) then begin
|
(DirectoryExists(ExtractFileDir(DebugFileName))) then begin
|
||||||
|
|
||||||
new(DebugText);
|
new(DebugText);
|
||||||
|
DebugTextAlloced := true;
|
||||||
Assign(DebugText^, DebugFileName);
|
Assign(DebugText^, DebugFileName);
|
||||||
if FileExists(DebugFileName) then
|
if FileExists(DebugFileName) then
|
||||||
Append(DebugText^)
|
Append(DebugText^)
|
||||||
@ -825,14 +827,16 @@ begin
|
|||||||
DebugText := nil
|
DebugText := nil
|
||||||
else
|
else
|
||||||
DebugText := @Output;
|
DebugText := @Output;
|
||||||
|
DebugTextAlloced := false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure FinalizeDebugOutput;
|
procedure FinalizeDebugOutput;
|
||||||
begin
|
begin
|
||||||
if Assigned(DebugText) and (DebugText<>@Output) then begin
|
if DebugTextAlloced then begin
|
||||||
Close(DebugText^);
|
Close(DebugText^);
|
||||||
Dispose(DebugText);
|
Dispose(DebugText);
|
||||||
|
DebugTextAlloced := false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user