diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_testcapimodule.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 350ef77..c82ba0c 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -4675,27 +4675,9 @@ decode_locale_ex(PyObject *self, PyObject *args) static PyObject * -get_global_config(PyObject *self, PyObject *Py_UNUSED(args)) +get_configs(PyObject *self, PyObject *Py_UNUSED(args)) { - return _Py_GetGlobalVariablesAsDict(); -} - - -static PyObject * -get_core_config(PyObject *self, PyObject *Py_UNUSED(args)) -{ - PyInterpreterState *interp = _PyInterpreterState_Get(); - const _PyCoreConfig *config = _PyInterpreterState_GetCoreConfig(interp); - return _PyCoreConfig_AsDict(config); -} - - -static PyObject * -get_main_config(PyObject *self, PyObject *Py_UNUSED(args)) -{ - PyInterpreterState *interp = _PyInterpreterState_Get(); - const _PyMainInterpreterConfig *config = _PyInterpreterState_GetMainConfig(interp); - return _PyMainInterpreterConfig_AsDict(config); + return _Py_GetConfigsAsDict(); } @@ -4942,9 +4924,7 @@ static PyMethodDef TestMethods[] = { {"bad_get", (PyCFunction)(void(*)(void))bad_get, METH_FASTCALL}, {"EncodeLocaleEx", encode_locale_ex, METH_VARARGS}, {"DecodeLocaleEx", decode_locale_ex, METH_VARARGS}, - {"get_global_config", get_global_config, METH_NOARGS}, - {"get_core_config", get_core_config, METH_NOARGS}, - {"get_main_config", get_main_config, METH_NOARGS}, + {"get_configs", get_configs, METH_NOARGS}, #ifdef Py_REF_DEBUG {"negative_refcount", negative_refcount, METH_NOARGS}, #endif |