8000
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.
PyUnstable_InterpreterState_GetMainModule
1 parent 5370ad1 commit 65da5dbCopy full SHA for 65da5db
Doc/c-api/init.rst
@@ -1445,6 +1445,17 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
1445
1446
.. versionadded:: 3.8
1447
1448
+
1449
+.. c:function:: PyObject* PyUnstable_InterpreterState_GetMainModule(PyInterpreterState *interp)
1450
1451
+ Return a :term:`strong reference` to the ``__main__`` `module object <moduleobjects>`_
1452
+ for the given interpreter.
1453
1454
+ The caller must hold the GIL.
1455
1456
+ .. versionadded:: 3.13
1457
1458
1459
.. c:type:: PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
1460
1461
Type of a frame evaluation function.
0 commit comments