-
-
Notifications
You must be signed in to change notification settings - Fork 324
Closed
Description
With FPC the function GetCurrentThreadId() returns type TThreadID, but the current code expects NativeInt.Can you type cast this, or is that not what is intended:
function TPythonInputOutput.GetCurrentThreadSlotIdx : Integer;
var
{$IFDEF FPC}
thread_id : TThreadID;
{$ELSE}
thread_id : NativeInt;
{$ENDIF}
i : Integer;
begin
thread_id := GetCurrentThreadId;
for i := 0 to FLinesPerThread.Count-1 do
if NativeInt(FLinesPerThread.Objects[i]) = NativeInt(thread_id) then
begin
Result := i;
Exit;
end;
Result := FLinesPerThread.AddObject( '', TObject(thread_id) );
end;
Metadata
Metadata
Assignees
Labels
No labels