8000 Add _imp._override_multi_interp_extensions_check(). · python/cpython@a3d3a65 · GitHub
[go: up one dir, main page]

Skip to content

Commit a3d3a65

Browse files
Add _imp._override_multi_interp_extensions_check().
1 parent 3c084eb commit a3d3a65

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

Python/clinic/import.c.h

Lines changed: 32 additions & 1 deletion
< 10000 /div>
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/import.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,6 +2371,27 @@ _imp__override_frozen_modules_for_tests_impl(PyObject *module, int override)
23712371
Py_RETURN_NONE;
23722372
}
23732373

2374+
/*[clinic input]
2375+
_imp._override_multi_interp_extensions_check
2376+
2377+
override: int
2378+
/
2379+
2380+
(internal-only) Override PyInterpreterConfig.check_multi_interp_extensions.
2381+
2382+
(-1: "never", 1: "always", 0: no override)
2383+
[clinic start generated code]*/
2384+
2385+
static PyObject *
2386+
_imp__override_multi_interp_extensions_check_impl(PyObject *module,
2387+
int override)
2388+
/*[clinic end generated code: output=3ff043af52bbf280 input=e086a2ea181f92ae]*/
2389+
{
2390+
PyInterpreterState *interp = _PyInterpreterState_GET();
2391+
interp->override_multi_interp_extensions_check = override;
2392+
Py_RETURN_NONE;
2393+
}
2394+
23742395
/* Common implementation for _imp.exec_dynamic and _imp.exec_builtin */
23752396
static int
23762397
exec_builtin_or_dynamic(PyObject *mod) {
@@ -2572,6 +2593,7 @@ static PyMethodDef imp_methods[] = {
25722593
_IMP_IS_FROZEN_METHODDEF
25732594
_IMP__FROZEN_MODULE_NAMES_METHODDEF
25742595
_IMP__OVERRIDE_FROZEN_MODULES_FOR_TESTS_METHODDEF
2596+
_IMP__OVERRIDE_MULTI_INTERP_EXTENSIONS_CHECK_METHODDEF
25752597
_IMP_CREATE_DYNAMIC_METHODDEF
25762598
_IMP_EXEC_DYNAMIC_METHODDEF
25772599
_IMP_EXEC_BUILTIN_METHODDEF

0 commit comments

Comments
 (0)
0