gh-104109: Expose Py_NewInterpreterFromConfig() in the Public C-API (… · python/cpython@292076a

@@ -546,7 +546,8 @@ pycore_init_runtime(_PyRuntimeState *runtime,

546546547547548548

static PyStatus

549-

init_interp_settings(PyInterpreterState *interp, const _PyInterpreterConfig *config)

549+

init_interp_settings(PyInterpreterState *interp,

550+

const PyInterpreterConfig *config)

550551

{

551552

assert(interp->feature_flags == 0);

552553

@@ -631,7 +632,7 @@ pycore_create_interpreter(_PyRuntimeState *runtime,

631632

return status;

632633

}

633634634-

const _PyInterpreterConfig config = _PyInterpreterConfig_LEGACY_INIT;

635+

const PyInterpreterConfig config = _PyInterpreterConfig_LEGACY_INIT;

635636

status = init_interp_settings(interp, &config);

636637

if (_PyStatus_EXCEPTION(status)) {

637638

return status;

@@ -1991,7 +1992,7 @@ Py_Finalize(void)

19911992

*/

1992199319931994

static PyStatus

1994-

new_interpreter(PyThreadState **tstate_p, const _PyInterpreterConfig *config)

1995+

new_interpreter(PyThreadState **tstate_p, const PyInterpreterConfig *config)

19951996

{

19961997

PyStatus status;

19971998

@@ -2079,8 +2080,8 @@ new_interpreter(PyThreadState **tstate_p, const _PyInterpreterConfig *config)

20792080

}

2080208120812082

PyStatus

2082-

_Py_NewInterpreterFromConfig(PyThreadState **tstate_p,

2083-

const _PyInterpreterConfig *config)

2083+

Py_NewInterpreterFromConfig(PyThreadState **tstate_p,

2084+

const PyInterpreterConfig *config)

20842085

{

20852086

return new_interpreter(tstate_p, config);

20862087

}

@@ -2089,8 +2090,8 @@ PyThreadState *

20892090

Py_NewInterpreter(void)

20902091

{

20912092

PyThreadState *tstate = NULL;

2092-

const _PyInterpreterConfig config = _PyInterpreterConfig_LEGACY_INIT;

2093-

PyStatus status = _Py_NewInterpreterFromConfig(&tstate, &config);

2093+

const PyInterpreterConfig config = _PyInterpreterConfig_LEGACY_INIT;

2094+

PyStatus status = new_interpreter(&tstate, &config);

20942095

if (_PyStatus_EXCEPTION(status)) {

20952096

Py_ExitStatusException(status);

20962097

}