We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PyImport_CreateModuleFromInitfunc
1 parent d38c0e4 commit d5be6e5Copy full SHA for d5be6e5
Doc/c-api/import.rst
@@ -333,3 +333,15 @@ Importing Modules
333
strings instead of Python :class:`str` objects.
334
335
.. versionadded:: 3.14
336
+
337
+.. c:function:: PyObject* PyImport_CreateModuleFromInitfunc(PyObject *spec, PyObject* (*initfunc)(void))
338
339
+ This function is a building block that enables embedders to implement custom
340
+ static extension importers (e.g. of statically-linked extensions).
341
+ The function creates and returns a module object given a *spec* and an *initfunc*.
342
343
+ *spec* must be a :class:`~importlib.machinery.ModuleSpec` object
344
345
+ *initfunc* is the same as in :c:func:`PyImport_ExtendInittab`
346
347
+ .. versionadded:: 3.15
0 commit comments