diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-11-12 00:06:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-12 00:06:05 (GMT) |
commit | 7f3a4b967cfb1596a3fda6c34f900f8586b16700 (patch) | |
tree | c4381e2cdfce4f636d2eff0288bf5ec59c74c44d /Include/cpython | |
parent | 67807cfc87135fdce4992d38d2ffe3e44747e73b (diff) | |
download | cpython-7f3a4b967cfb1596a3fda6c34f900f8586b16700.zip cpython-7f3a4b967cfb1596a3fda6c34f900f8586b16700.tar.gz cpython-7f3a4b967cfb1596a3fda6c34f900f8586b16700.tar.bz2 |
gh-81057: Move PyImport_Inittab to _PyRuntimeState (gh-99402)
We actually don't move PyImport_Inittab. Instead, we make a copy that we keep on _PyRuntimeState and use only that after Py_Initialize(). We also prevent folks from modifying PyImport_Inittab (the best we can) after that point.
https://github.com/python/cpython/issues/81057
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/import.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/cpython/import.h b/Include/cpython/import.h index a69b4f3..a58801b 100644 --- a/Include/cpython/import.h +++ b/Include/cpython/import.h @@ -25,6 +25,7 @@ struct _inittab { const char *name; /* ASCII encoded string */ PyObject* (*initfunc)(void); }; +// This is not used after Py_Initialize() is called. PyAPI_DATA(struct _inittab *) PyImport_Inittab; PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab); |