@@ -2637,20 +2637,21 @@ TPyVar = class(TPyObject)
2637
2637
TPythonThread = class (TThread)
2638
2638
private
2639
2639
fThreadState: PPyThreadState;
2640
- f_savethreadstate: PPyThreadState;
2641
2640
fThreadExecMode: TThreadExecMode;
2641
+ private class threadvar
2642
+ f_savethreadstate: PPyThreadState;
2642
2643
2643
2644
// Do not overwrite Execute! Use ExecuteWithPython instead!
2644
2645
procedure Execute ; override;
2645
2646
protected
2646
2647
procedure ExecuteWithPython ; virtual ; abstract ;
2647
2648
2648
- procedure Py_Begin_Allow_Threads ;
2649
- procedure Py_End_Allow_Threads ;
2649
+ class procedure Py_Begin_Allow_Threads ;
2650
+ class procedure Py_End_Allow_Threads ;
2650
2651
// The following procedures are redundant and only for
2651
2652
// compatibility to the C API documentation.
2652
- procedure Py_Begin_Block_Threads ;
2653
- procedure Py_Begin_Unblock_Threads ;
2653
+ class procedure Py_Begin_Block_Threads ;
2654
+ class procedure Py_Begin_Unblock_Threads ;
2654
2655
2655
2656
public
2656
2657
property ThreadState : PPyThreadState read fThreadState;
@@ -8600,24 +8601,24 @@ procedure TPythonThread.Execute;
8600
8601
end ;
8601
8602
8602
8603
8603
- procedure TPythonThread.Py_Begin_Allow_Threads ;
8604
+ class procedure TPythonThread.Py_Begin_Allow_Threads ;
8604
8605
begin
8605
8606
with GetPythonEngine do
8606
8607
f_savethreadstate := PyEval_SaveThread;
8607
8608
end ;
8608
8609
8609
- procedure TPythonThread.Py_End_Allow_Threads ;
8610
+ class procedure TPythonThread.Py_End_Allow_Threads ;
8610
8611
begin
8611
8612
with GetPythonEngine do
8612
- PyEval_RestoreThread( f_savethreadstate);
8613
+ PyEval_RestoreThread(f_savethreadstate);
8613
8614
end ;
8614
8615
8615
- procedure TPythonThread.Py_Begin_Block_Threads ;
8616
+ class procedure TPythonThread.Py_Begin_Block_Threads ;
8616
8617
begin
8617
8618
Py_End_Allow_Threads;
8618
8619
end ;
8619
8620
8620
- procedure TPythonThread.Py_Begin_Unblock_Threads ;
8621
+ class procedure TPythonThread.Py_Begin_Unblock_Threads ;
8621
8622
begin
8622
8623
Py_Begin_Allow_Threads;
8623
8624
end ;
0 commit comments