gh-118915: Document PyUnstable_InterpreterState_GetMainModule (GH-128483)

This commit is contained in:
Peter Bierma 2025-01-09 08:54:44 -05:00 committed by GitHub
parent 4322a318ea
commit ea39c8b08d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1492,6 +1492,17 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
.. versionadded:: 3.8
.. c:function:: PyObject* PyUnstable_InterpreterState_GetMainModule(PyInterpreterState *interp)
Return a :term:`strong reference` to the ``__main__`` `module object <moduleobjects>`_
for the given interpreter.
The caller must hold the GIL.
.. versionadded:: 3.13
.. c:type:: PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
Type of a frame evaluation function.