https://github.com/python/cpython/commit/65da5db28a39cb0d9ee311206bdc8745b482c56f
commit: 65da5db28a39cb0d9ee311206bdc8745b482c56f
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: encukou <[email protected]>
date: 2025-01-10T08:41:14+01:00
summary:

[3.13] gh-118915: Document `PyUnstable_InterpreterState_GetMainModule` 
(GH-128483) (GH-128677)

(cherry picked from commit ea39c8b08d8f025273bfa5b7a95f7b5984dc1e86)

Co-authored-by: Peter Bierma <[email protected]>

files:
M Doc/c-api/init.rst

diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
index d0632cb6fa172f..130942e070ef7a 100644
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -1445,6 +1445,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.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to