diff options
author | Peter Bierma <zintensitydev@gmail.com> | 2025-01-09 13:54:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-09 13:54:44 (GMT) |
commit | ea39c8b08d8f025273bfa5b7a95f7b5984dc1e86 (patch) | |
tree | b1d8cb79974fd7b571042e8470135910d72bd973 /Doc/c-api | |
parent | 4322a318ea98ceeb95d88b7ae6b5cfa3572d2069 (diff) | |
download | cpython-ea39c8b08d8f025273bfa5b7a95f7b5984dc1e86.zip cpython-ea39c8b08d8f025273bfa5b7a95f7b5984dc1e86.tar.gz cpython-ea39c8b08d8f025273bfa5b7a95f7b5984dc1e86.tar.bz2 |
gh-118915: Document `PyUnstable_InterpreterState_GetMainModule` (GH-128483)
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/init.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index dd63dd0..97996a6 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -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. |