File tree 12 files changed +1005
-985
lines changed
12 files changed +1005
-985
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,9 @@ extern struct _PyInterpreterFrame* _PyEval_GetFrame(void);
133
133
134
134
extern PyObject * _Py_MakeCoro (PyFunctionObject * func );
135
135
136
+ extern int _Py_HandlePending (PyThreadState * tstate );
137
+
138
+
136
139
#ifdef __cplusplus
137
140
}
138
141
#endif
Original file line number Diff line number Diff line change @@ -85,13 +85,14 @@ _PyThreadState_GET(void)
85
85
return _PyRuntimeState_GetThreadState (& _PyRuntime );
86
86
}
87
87
88
- PyAPI_FUNC (void ) _Py_NO_RETURN _Py_FatalError_TstateNULL (const char * func );
89
-
90
88
static inline void
91
89
_Py_EnsureFuncTstateNotNULL (const char * func , PyThreadState * tstate )
92
90
{
93
91
if (tstate == NULL ) {
94
- _Py_FatalError_TstateNULL (func );
92
+ _Py_FatalErrorFunc (func ,
93
+ "the function must be called with the GIL held, "
94
+ "after Python initialization and before Python finalization, "
95
+ "but the GIL is released (the current Python thread state is NULL)" );
95
96
}
96
97
}
97
98
Original file line number Diff line number Diff line change @@ -388,6 +388,7 @@ PYTHON_OBJS= \
388
388
Python/getcopyright.o \
389
389
Python/getplatform.o \
390
390
Python/getversion.o \
391
+ Python/ceval_gil.o \
391
392
Python/hamt.o \
392
393
Python/hashtable.o \
393
394
Python/import.o \
@@ -1419,8 +1420,7 @@ regen-opcode-targets:
1419
1420
$(srcdir)/Python/opcode_targets.h.new
1420
1421
$(UPDATE_FILE) $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/opcode_targets.h.new
1421
1422
1422
- Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h \
1423
- $(srcdir)/Python/condvar.h
1423
+ Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/condvar.h
1424
1424
1425
1425
Python/frozen.o: $(FROZEN_FILES_OUT)
1426
1426
Original file line number Diff line number Diff line change 199
199
<ClCompile Include =" ..\Python\getopt.c" />
200
200
<ClCompile Include =" ..\Python\getplatform.c" />
201
201
<ClCompile Include =" ..\Python\getversion.c" />
202
+ <ClCompile Include =" ..\Python\ceval_gil.c" />
202
203
<ClCompile Include =" ..\Python\hamt.c" />
203
204
<ClCompile Include =" ..\Python\hashtable.c" />
204
205
<ClCompile Include =" ..\Python\import.c" />
Original file line number Diff line number Diff line change 184
184
<ClCompile Include =" ..\Python\getversion.c" >
185
185
<Filter >Source Files</Filter >
186
186
</ClCompile >
187
+ <ClCompile Include =" ..\Python\ceval_gil.c" >
188
+ <Filter >Source Files</Filter >
189
+ </ClCompile >
187
190
<ClCompile Include =" ..\Python\hamt.c" >
188
191
<Filter >Source Files</Filter >
189
192
</ClCompile >
Original file line number Diff line number Diff line change 327
327
<ClInclude Include =" ..\Parser\pegen.h" />
328
328
<ClInclude Include =" ..\PC\errmap.h" />
329
329
<ClInclude Include =" ..\PC\pyconfig.h" />
330
- <ClInclude Include =" ..\Python\ceval_gil.h" />
331
330
<ClInclude Include =" ..\Python\condvar.h" />
332
331
<ClInclude Include =" ..\Python\importdl.h" />
333
332
<ClInclude Include =" ..\Python\stdlib_module_names.h" />
502
501
<ClCompile Include =" ..\Python\getopt.c" />
503
502
<ClCompile Include =" ..\Python\getplatform.c" />
504
503
<ClCompile Include =" ..\Python\getversion.c" />
504
+ <ClCompile Include =" ..\Python\ceval_gil.c" />
505
505
<ClCompile Include =" ..\Python\hamt.c" />
506
506
<ClCompile Include =" ..\Python\hashtable.c" />
507
507
<ClCompile Include =" ..\Python\import.c" />
Original file line number Diff line number Diff line change 312
312
<ClInclude Include =" ..\Python\condvar.h" >
313
313
<Filter >Python</Filter >
314
314
</ClInclude >
315
- <ClInclude Include =" ..\Python\ceval_gil.h" >
316
- <Filter >Python</Filter >
317
- </ClInclude >
318
315
<ClInclude Include =" ..\Include\pyhash.h" >
319
316
<Filter >Include</Filter >
320
317
</ClInclude >
1097
1094
<ClCompile Include =" ..\Python\getversion.c" >
1098
1095
<Filter >Python</Filter >
1099
1096
</ClCompile >
1097
+ <ClCompile Include =" ..\Python\ceval_gil.c" >
1098
+ <Filter >Python</Filter >
1099
+ </ClCompile >
1100
1100
<ClCompile Include =" ..\Python\hashtable.c" >
1101
1101
<Filter >Modules</Filter >
1102
1102
</ClCompile >
You can’t perform that action at this time.
0 commit comments