Skip to content

Commit 65da5db

Browse files
[3.13] gh-118915: Document PyUnstable_InterpreterState_GetMainModule (GH-128483) (GH-128677)
(cherry picked from commit ea39c8b) Co-authored-by: Peter Bierma <[email protected]>
1 parent 5370ad1 commit 65da5db

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Doc/c-api/init.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,6 +1445,17 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
14451445
14461446
.. versionadded:: 3.8
14471447
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+
14481459
.. c:type:: PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
14491460
14501461
Type of a frame evaluation function.

0 commit comments

Comments
 (0)