bpo-34567: pythoninfo gets coreconfig (GH-9043)

* Add _testcapi.get_coreconfig() to get the _PyCoreConfig of the
  interpreter
* test.pythoninfo now gets the core configuration using
  _testcapi.get_coreconfig()
This commit is contained in:
Victor Stinner 2018-09-03 17:06:39 +02:00 committed by GitHub
parent 8ea09110d4
commit 2094c2bea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 174 additions and 3 deletions

View file

@ -1018,8 +1018,8 @@ pymain_init_core_argv(_PyMain *pymain, _PyCoreConfig *config, _PyCmdline *cmdlin
}
static PyObject*
wstrlist_as_pylist(int len, wchar_t **list)
PyObject*
_Py_wstrlist_as_pylist(int len, wchar_t **list)
{
assert(list != NULL || len < 1);
@ -1502,7 +1502,7 @@ _PyMainInterpreterConfig_Read(_PyMainInterpreterConfig *main_config,
#define COPY_WSTRLIST(ATTR, LEN, LIST) \
do { \
if (ATTR == NULL) { \
ATTR = wstrlist_as_pylist(LEN, LIST); \
ATTR = _Py_wstrlist_as_pylist(LEN, LIST); \
if (ATTR == NULL) { \
return _Py_INIT_NO_MEMORY(); \
} \