diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2017-09-04 23:54:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 23:54:09 (GMT) |
commit | 86b7afdfeee77993fe896a2aa13b3f4f95973f16 (patch) | |
tree | a37fbb7233319c671e4787bff683629148cab971 /Include | |
parent | f5ea83f4864232fecc042ff0d1c2401807b19280 (diff) | |
download | cpython-86b7afdfeee77993fe896a2aa13b3f4f95973f16.zip cpython-86b7afdfeee77993fe896a2aa13b3f4f95973f16.tar.gz cpython-86b7afdfeee77993fe896a2aa13b3f4f95973f16.tar.bz2 |
bpo-28411: Remove "modules" field from Py_InterpreterState. (#1638)
sys.modules is the one true source.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/import.h | 25 | ||||
-rw-r--r-- | Include/modsupport.h | 4 | ||||
-rw-r--r-- | Include/pystate.h | 1 |
3 files changed, 26 insertions, 4 deletions
diff --git a/Include/import.h b/Include/import.h index bb6beba6..4ab14d7 100644 --- a/Include/import.h +++ b/Include/import.h @@ -38,11 +38,25 @@ PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleObject( ); #endif PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void); +#ifndef Py_LIMITED_API +PyAPI_FUNC(int) _PyImport_IsInitialized(PyInterpreterState *); +#endif +PyAPI_FUNC(PyObject *) PyImport_GetModule(PyObject *name); +#ifndef Py_LIMITED_API +PyAPI_FUNC(PyObject *) _PyImport_GetModule(PyObject *name); +PyAPI_FUNC(PyObject *) _PyImport_GetModuleWithError(PyObject *name); +PyAPI_FUNC(PyObject *) _PyImport_GetModuleId(struct _Py_Identifier *name); +PyAPI_FUNC(int) _PyImport_SetModule(PyObject *name, PyObject *module); +PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module); +#endif #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 PyAPI_FUNC(PyObject *) PyImport_AddModuleObject( PyObject *name ); #endif +#ifndef Py_LIMITED_API +PyAPI_FUNC(PyObject *) _PyImport_AddModuleObject(PyObject *, PyObject *); +#endif PyAPI_FUNC(PyObject *) PyImport_AddModule( const char *name /* UTF-8 encoded string */ ); @@ -97,14 +111,19 @@ PyAPI_FUNC(int) _PyImport_ReleaseLock(void); PyAPI_FUNC(void) _PyImport_ReInitLock(void); PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin( - const char *name /* UTF-8 encoded string */ + const char *name, /* UTF-8 encoded string */ + PyObject *modules ); PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *); +PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObjectEx(PyObject *, PyObject *, + PyObject *); PyAPI_FUNC(int) _PyImport_FixupBuiltin( PyObject *mod, - const char *name /* UTF-8 encoded string */ + const char *name, /* UTF-8 encoded string */ + PyObject *modules ); -PyAPI_FUNC(int) _PyImport_FixupExtensionObject(PyObject*, PyObject *, PyObject *); +PyAPI_FUNC(int) _PyImport_FixupExtensionObject(PyObject*, PyObject *, + PyObject *, PyObject *); struct _inittab { const char *name; /* ASCII encoded string */ diff --git a/Include/modsupport.h b/Include/modsupport.h index 8c7cf39..73d86a9 100644 --- a/Include/modsupport.h +++ b/Include/modsupport.h @@ -191,6 +191,10 @@ PyAPI_FUNC(int) PyModule_ExecDef(PyObject *module, PyModuleDef *def); PyAPI_FUNC(PyObject *) PyModule_Create2(struct PyModuleDef*, int apiver); +#ifndef Py_LIMITED_API +PyAPI_FUNC(PyObject *) _PyModule_CreateInitialized(struct PyModuleDef*, + int apiver); +#endif #ifdef Py_LIMITED_API #define PyModule_Create(module) \ diff --git a/Include/pystate.h b/Include/pystate.h index edfb08b..8a92f3e 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -52,7 +52,6 @@ typedef struct _is { int64_t id; - PyObject *modules; PyObject *modules_by_index; PyObject *sysdict; PyObject *builtins; |