@@ -1605,7 +1605,6 @@ TPythonInterface=class(TDynamicDll)
1605
1605
PyEval_GetGlobals:function :PPyObject; cdecl;
1606
1606
PyEval_GetLocals:function :PPyObject; cdecl;
1607
1607
1608
- PyEval_InitThreads:procedure; cdecl;
1609
1608
PyEval_RestoreThread:procedure( tstate: PPyThreadState); cdecl;
1610
1609
PyEval_SaveThread:function :PPyThreadState; cdecl;
1611
1610
@@ -2013,7 +2012,6 @@ TPythonEngine = class(TPythonInterface)
2013
2012
FProgramName: UnicodeString;
2014
2013
FPythonHome: UnicodeString;
2015
2014
FPythonPath: WCharTString;
2016
- FInitThreads: Boolean;
2017
2015
FOnSysPathInit: TSysPathInitEvent;
2018
2016
FTraceback: TPythonTraceback;
2019
2017
FUseWindowsConsole: Boolean;
@@ -2042,7 +2040,6 @@ TPythonEngine = class(TPythonInterface)
2042
2040
procedure DoOpenDll (const aDllName : string); override;
2043
2041
procedure SetInitScript (Value : TStrings);
2044
2042
function GetThreadState : PPyThreadState;
2045
- procedure SetInitThreads (Value : Boolean);
2046
2043
function GetClientCount : Integer;
2047
2044
function GetClients ( idx : Integer ) : TEngineClient;
2048
2045
procedure Notification (AComponent: TComponent;
@@ -2159,7 +2156,6 @@ TPythonEngine = class(TPythonInterface)
2159
2156
property VenvPythonExe: string read FVenvPythonExe write FVenvPythonExe;
2160
2157
property DatetimeConversionMode: TDatetimeConversionMode read FDatetimeConversionMode write FDatetimeConversionMode default DEFAULT_DATETIME_CONVERSION_MODE;
2161
2158
property InitScript: TStrings read FInitScript write SetInitScript;
2162
- property InitThreads: Boolean read FInitThreads write SetInitThreads default False;
2163
2159
property IO: TPythonInputOutput read FIO write SetIO;
2164
2160
property PyFlags: TPythonFlags read FPyFlags write SetPyFlags default [];
2165
2161
property RedirectIO: Boolean read FRedirectIO write FRedirectIO default True;
@@ -3880,7 +3876,6 @@ procedure TPythonInterface.MapDll;
3880
3876
PyEval_GetFrame := Import (' PyEval_GetFrame' );
3881
3877
PyEval_GetGlobals := Import (' PyEval_GetGlobals' );
3882
3878
PyEval_GetLocals := Import (' PyEval_GetLocals' );
3883
- PyEval_InitThreads := Import (' PyEval_InitThreads' );
3884
3879
PyEval_RestoreThread := Import (' PyEval_RestoreThread' );
3885
3880
PyEval_SaveThread := Import (' PyEval_SaveThread' );
3886
3881
PyFile_GetLine := Import (' PyFile_GetLine' );
@@ -4555,7 +4550,6 @@ constructor TPythonEngine.Create(AOwner: TComponent);
4555
4550
FRedirectIO := True;
4556
4551
FExecModule := ' __main__' ;
4557
4552
FAutoFinalize := True;
4558
- FInitThreads := False;
4559
4553
FTraceback := TPythonTraceback.Create;
4560
4554
FUseWindowsConsole := False;
4561
4555
FPyFlags := [];
@@ -4787,8 +4781,6 @@ procedure TPythonEngine.Initialize;
4787
4781
else
4788
4782
FInitialized := True;
4789
4783
InitSysPath;
4790
- if InitThreads and Assigned(PyEval_InitThreads) then
4791
- PyEval_InitThreads;
4792
4784
if RedirectIO and Assigned(FIO) then
4793
4785
DoRedirectIO;
4794
4786
end ;
@@ -4820,16 +4812,6 @@ function TPythonEngine.GetThreadState: PPyThreadState;
4820
4812
Result := nil ;
4821
4813
end ;
4822
4814
4823
- procedure TPythonEngine.SetInitThreads (Value : Boolean);
4824
- begin
4825
- if Value <> FInitThreads then
4826
- begin
4827
- if Value and Assigned(PyEval_InitThreads) then
4828
- PyEval_InitThreads;
4829
- FInitThreads := Value ;
4830
- end ;
4831
- end ;
4832
-
4833
4815
procedure TPythonEngine.SetIO (InputOutput: TPythonInputOutput);
4834
4816
begin
4835
4817
if InputOutput <> fIO then
0 commit comments