mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Issue #24769: Interpreter now starts properly when dynamic loading
is disabled. Patch by Petr Viktorin.
This commit is contained in:
parent
7250d02b73
commit
1df0b35e3d
5 changed files with 80 additions and 26 deletions
|
|
@ -318,6 +318,33 @@ exit:
|
|||
|
||||
#endif /* defined(HAVE_DYNAMIC_LOADING) */
|
||||
|
||||
PyDoc_STRVAR(_imp_exec_builtin__doc__,
|
||||
"exec_builtin($module, mod, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
"Initialize an extension module.");
|
||||
|
||||
#define _IMP_EXEC_BUILTIN_METHODDEF \
|
||||
{"exec_builtin", (PyCFunction)_imp_exec_builtin, METH_O, _imp_exec_builtin__doc__},
|
||||
|
||||
static int
|
||||
_imp_exec_builtin_impl(PyModuleDef *module, PyObject *mod);
|
||||
|
||||
static PyObject *
|
||||
_imp_exec_builtin(PyModuleDef *module, PyObject *mod)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
int _return_value;
|
||||
|
||||
_return_value = _imp_exec_builtin_impl(module, mod);
|
||||
if ((_return_value == -1) && PyErr_Occurred())
|
||||
goto exit;
|
||||
return_value = PyLong_FromLong((long)_return_value);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
#ifndef _IMP_CREATE_DYNAMIC_METHODDEF
|
||||
#define _IMP_CREATE_DYNAMIC_METHODDEF
|
||||
#endif /* !defined(_IMP_CREATE_DYNAMIC_METHODDEF) */
|
||||
|
|
@ -325,4 +352,4 @@ exit:
|
|||
#ifndef _IMP_EXEC_DYNAMIC_METHODDEF
|
||||
#define _IMP_EXEC_DYNAMIC_METHODDEF
|
||||
#endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
|
||||
/*[clinic end generated code: output=0f1059766dd58f88 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=c38749cebcadbc3b input=a9049054013a1b77]*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue