summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-11-04 23:45:56 (GMT)
committerGitHub <noreply@github.com>2020-11-04 23:45:56 (GMT)
commit048a35659aa8074afe7d7d054e7cea1f8ee6d366 (patch)
treee9a019387bbd73cdbfcdceb76af7d21e15bc30d0 /Include/internal
parent100964e0310d3a2040d0db976f7984d0507b2dbd (diff)
downloadcpython-048a35659aa8074afe7d7d054e7cea1f8ee6d366.zip
cpython-048a35659aa8074afe7d7d054e7cea1f8ee6d366.tar.gz
cpython-048a35659aa8074afe7d7d054e7cea1f8ee6d366.tar.bz2
bpo-42260: Add _PyInterpreterState_SetConfig() (GH-23158)
* Inline _PyInterpreterState_SetConfig(): replace it with _PyConfig_Copy(). * Add _PyErr_SetFromPyStatus() * Add _PyInterpreterState_GetConfigCopy() * Add a new _PyInterpreterState_SetConfig() function. * Add an unit which gets, modifies, and sets the config.
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pycore_initconfig.h2
-rw-r--r--Include/internal/pycore_interp.h6
2 files changed, 2 insertions, 6 deletions
diff --git a/Include/internal/pycore_initconfig.h b/Include/internal/pycore_initconfig.h
index 457a005..df7ad77 100644
--- a/Include/internal/pycore_initconfig.h
+++ b/Include/internal/pycore_initconfig.h
@@ -44,6 +44,8 @@ struct pyruntimestate;
#define _PyStatus_UPDATE_FUNC(err) \
do { err.func = _PyStatus_GET_FUNC(); } while (0)
+PyObject* _PyErr_SetFromPyStatus(PyStatus status);
+
/* --- PyWideStringList ------------------------------------------------ */
#define _PyWideStringList_INIT (PyWideStringList){.length = 0, .items = NULL}
diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h
index 9923b6b..4b67a86 100644
--- a/Include/internal/pycore_interp.h
+++ b/Include/internal/pycore_interp.h
@@ -263,13 +263,7 @@ struct _is {
struct ast_state ast;
};
-/* Used by _PyImport_Cleanup() */
extern void _PyInterpreterState_ClearModules(PyInterpreterState *interp);
-
-extern PyStatus _PyInterpreterState_SetConfig(
- PyInterpreterState *interp,
- const PyConfig *config);
-
extern void _PyInterpreterState_Clear(PyThreadState *tstate);