Skip to content

Commit faf072f

Browse files
committed
sync P4D, about TPythonThread
1 parent dffde0d commit faf072f

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

python4lazarus/PythonEngine.pas

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,17 +2617,15 @@ TPythonThread = class(TThread)
26172617
protected
26182618
procedure ExecuteWithPython; virtual; abstract;
26192619
public
2620-
procedure Py_Begin_Allow_Threads;
2621-
procedure Py_End_Allow_Threads;
2620+
class procedure Py_Begin_Allow_Threads;
2621+
class procedure Py_End_Allow_Threads;
26222622
// The following procedures are redundant and only for
26232623
// compatibility to the C API documentation.
2624-
procedure Py_Begin_Block_Threads;
2625-
procedure Py_Begin_Unblock_Threads;
2624+
class procedure Py_Begin_Block_Threads;
2625+
class procedure Py_Begin_Unblock_Threads;
26262626

2627-
property ThreadState: PPyThreadState read fThreadState
2628-
write fThreadState;
2629-
property ThreadExecMode: TThreadExecMode read fThreadExecMode
2630-
write fThreadExecMode;
2627+
property ThreadState : PPyThreadState read fThreadState;
2628+
property ThreadExecMode: TThreadExecMode read fThreadExecMode write fThreadExecMode;
26312629
end;
26322630
{$HINTS ON}
26332631

@@ -8462,24 +8460,24 @@ procedure TPythonThread.Execute;
84628460
end;
84638461

84648462

8465-
procedure TPythonThread.Py_Begin_Allow_Threads;
8463+
class procedure TPythonThread.Py_Begin_Allow_Threads;
84668464
begin
84678465
with GetPythonEngine do
84688466
f_savethreadstate := PyEval_SaveThread;
84698467
end;
84708468

8471-
procedure TPythonThread.Py_End_Allow_Threads;
8469+
class procedure TPythonThread.Py_End_Allow_Threads;
84728470
begin
84738471
with GetPythonEngine do
84748472
PyEval_RestoreThread( f_savethreadstate);
84758473
end;
84768474

8477-
procedure TPythonThread.Py_Begin_Block_Threads;
8475+
class procedure TPythonThread.Py_Begin_Block_Threads;
84788476
begin
84798477
Py_End_Allow_Threads;
84808478
end;
84818479

8482-
procedure TPythonThread.Py_Begin_Unblock_Threads;
8480+
class procedure TPythonThread.Py_Begin_Unblock_Threads;
84838481
begin
84848482
Py_Begin_Allow_Threads;
84858483
end;

0 commit comments

Comments
 (0)