File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleObject(
39
39
#endif
40
40
PyAPI_FUNC (PyObject * ) PyImport_GetModuleDict (void );
41
41
#ifndef Py_LIMITED_API
42
- PyAPI_FUNC (PyObject * ) _PyImport_GetModuleDict (PyThreadState * tstate );
43
- PyAPI_FUNC (void ) _PyImport_EnsureInitialized (PyInterpreterState * interp );
42
+ PyAPI_FUNC (PyObject * ) _PyImport_GetModuleDict (PyInterpreterState * );
43
+ PyAPI_FUNC (void ) _PyImport_EnsureInitialized (PyInterpreterState * );
44
44
#endif
45
45
#if !defined(Py_LIMITED_API ) || Py_LIMITED_API + 0 >= 0x03030000
46
46
PyAPI_FUNC (PyObject * ) PyImport_AddModuleObject (
Original file line number Diff line number Diff line change @@ -288,20 +288,18 @@ _PyImport_Fini(void)
288
288
/* Helper for sys */
289
289
290
290
PyObject *
291
- _PyImport_GetModuleDict (PyThreadState * tstate )
291
+ _PyImport_GetModuleDict (PyInterpreterState * interp )
292
292
{
293
- PyInterpreterState * interp = tstate -> interp ;
294
293
if (interp -> modules == NULL )
295
294
Py_FatalError ("PyImport_GetModuleDict: no module dictionary!" );
296
295
return interp -> modules ;
297
296
298
297
/* We aren't ready to do this yet.
299
- if (tstate-> interp->sysdict == NULL)
300
- Py_FatalError("_PyImport_GetModuleDict : no sys module!");
298
+ if (interp->sysdict == NULL)
299
+ Py_FatalError("PyImport_GetModuleDict : no sys module!");
301
300
302
301
_Py_IDENTIFIER(modules);
303
- PyObject *modules = _PyDict_GetItemId(tstate->interp->sysdict,
304
- &PyId_modules);
302
+ PyObject *modules = _PyDict_GetItemId(interp->sysdict, &PyId_modules);
305
303
if (modules == NULL)
306
304
Py_FatalError("lost sys.modules");
307
305
return modules;
@@ -311,7 +309,7 @@ _PyImport_GetModuleDict(PyThreadState *tstate)
311
309
PyObject *
312
310
PyImport_GetModuleDict (void )
313
311
{
314
- return _PyImport_GetModuleDict (PyThreadState_GET ());
312
+ return _PyImport_GetModuleDict (PyThreadState_GET ()-> interp );
315
313
}
316
314
317
315
/* In some corner cases it is important to be sure that the import
You can’t perform that action at this time.
0 commit comments