bpo-36635: Add _testinternalcapi module (GH-12841)

Add a new _testinternalcapi module to test the internal C API.

Move _Py_GetConfigsAsDict() function to the internal C API:
_testembed now uses _testinternalcapi to access the function.
This commit is contained in:
Victor Stinner 2019-04-18 11:37:26 +02:00 committed by GitHub
parent 11efd79076
commit 23bace26ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 172 additions and 49 deletions

View file

@ -4736,13 +4736,6 @@ decode_locale_ex(PyObject *self, PyObject *args)
}
static PyObject *
get_configs(PyObject *self, PyObject *Py_UNUSED(args))
{
return _Py_GetConfigsAsDict();
}
#ifdef Py_REF_DEBUG
static PyObject *
negative_refcount(PyObject *self, PyObject *Py_UNUSED(args))
@ -4990,7 +4983,6 @@ 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_configs", get_configs, METH_NOARGS},
#ifdef Py_REF_DEBUG
{"negative_refcount", negative_refcount, METH_NOARGS},
#endif