File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -2225,14 +2225,24 @@ static PyStructSequence_Desc waitid_result_desc = {
2225
2225
5
2226
2226
};
2227
2227
#endif
2228
- static newfunc structseq_new ;
2229
2228
2230
2229
static PyObject *
2231
2230
statresult_new (PyTypeObject * type , PyObject * args , PyObject * kwds )
2232
2231
{
2233
2232
PyStructSequence * result ;
2234
2233
int i ;
2235
2234
2235
+ PyObject * mod = PyType_GetModule (type );
2236
+ if (mod == NULL ) {
2237
+ return NULL ;
2238
+ }
2239
+ _posixstate * state = get_posix_state (mod );
2240
+ Py_DECREF (mod );
2241
+ if (state != NULL ) {
2242
+ return NULL ;
2243
+ }
2244
+ #define structseq_new ((PyTypeObject *)state->StatResultType)->tp_new
2245
+
2236
2246
result = (PyStructSequence * )structseq_new (type , args , kwds );
2237
2247
if (!result )
2238
2248
return NULL ;
@@ -15909,7 +15919,6 @@ posixmodule_exec(PyObject *m)
15909
15919
}
15910
15920
PyModule_AddObject (m , "stat_result" , Py_NewRef (StatResultType ));
15911
15921
state -> StatResultType = StatResultType ;
15912
- structseq_new = ((PyTypeObject * )StatResultType )-> tp_new ;
15913
15922
((PyTypeObject * )StatResultType )-> tp_new = statresult_new ;
15914
15923
15915
15924
statvfs_result_desc .name = "os.statvfs_result" ; /* see issue #19209 */
Original file line number Diff line number Diff line change @@ -399,7 +399,6 @@ Modules/faulthandler.c - old_stack -
399
399
# initialized once
400
400
401
401
Modules/_io/bufferedio.c _PyIO_trap_eintr eintr_int -
402
- Modules/posixmodule.c - structseq_new -
403
402
Modules/posixmodule.c - ticks_per_second -
404
403
Modules/timemodule.c _PyTime_GetClockWithInfo initialized -
405
404
Modules/timemodule.c _PyTime_GetProcessTimeWithInfo ticks_per_second -
You can’t perform that action at this time.
0 commit comments