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 4322a31 commit ea39c8bCopy full SHA for ea39c8b
Doc/c-api/init.rst
@@ -1492,6 +1492,17 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
1492
1493
.. versionadded:: 3.8
1494
1495
+
1496
+.. c:function:: PyObject* PyUnstable_InterpreterState_GetMainModule(PyInterpreterState *interp)
1497
1498
+ Return a :term:`strong reference` to the ``__main__`` `module object <moduleobjects>`_
1499
+ for the given interpreter.
1500
1501
+ The caller must hold the GIL.
1502
1503
+ .. versionadded:: 3.13
1504
1505
1506
.. c:type:: PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
1507
1508
Type of a frame evaluation function.
0 commit comments