gh-105922: Add PyImport_AddModuleRef() function (#105923)

* Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and
  PyImport_AddModuleObject().
* pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with
  PyImport_AddModuleRef(name).
This commit is contained in:
Victor Stinner 2023-06-20 08:48:14 +02:00 committed by GitHub
parent 7f97c8e367
commit 03f1a132ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 150 additions and 25 deletions

1
PC/python3dll.c generated
View file

@ -288,6 +288,7 @@ EXPORT_FUNC(PyGILState_GetThisThreadState)
EXPORT_FUNC(PyGILState_Release)
EXPORT_FUNC(PyImport_AddModule)
EXPORT_FUNC(PyImport_AddModuleObject)
EXPORT_FUNC(PyImport_AddModuleRef)
EXPORT_FUNC(PyImport_AppendInittab)
EXPORT_FUNC(PyImport_ExecCodeModule)
EXPORT_FUNC(PyImport_ExecCodeModuleEx)