| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| Expand Up | @@ -1225,6 +1225,12 @@ All of the following functions must be called after :c:func:`Py_Initialize`. | |||||
| :c:func:`PyEval_SaveThread` is a higher-level function which is always | ||||||
| available (even when threads have not been initialized). | ||||||
|
|
||||||
| .. c:function:: PyObject* PyUnstable_InterpreterState_GetMainModule(PyInterpreterState *interp) | ||||||
|
|
||||||
| Returns a :term:`strong reference` to the ``__main__`` module of the given interpreter *interp*. | ||||||
| Fails with a :exc:`RuntimeError` if the interpreter is not initialized. | ||||||
|
|
||||||
| .. versionadded:: 3.12 | ||||||
|
|
||||||
| .. _sub-interpreter-support: | ||||||
|
|
||||||
| Expand Down Expand Up | @@ -1464,6 +1470,29 @@ function. You can create and destroy them using the following functions: | |||||
| :c:func:`Py_FinalizeEx` will destroy all sub-interpreters that | ||||||
| haven't been explicitly destroyed at that point. | ||||||
|
|
||||||
| Interpreter ID Objects | ||||||
| ---------------------- | ||||||
|
|
||||||
| A interpreter ID identifies a interpreter and may be used as an int. | ||||||
|
Comment thread
Copy link
Copy Markdown
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality@hugovk suggested that you link to the class definition, A interpreter ID identifies a interpreter and may be used as an int. to A interpreter ID identifies a interpreter and may be used as an :class:`int`.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
Sorry, something went wrong.
All reactions
|
||||||
|
|
||||||
| .. versionadded:: 3.12 | ||||||
|
|
||||||
| .. c:var:: PyTypeObject PyInterpreterID_Type | ||||||
|
|
||||||
| This instance of :c:type:`PyTypeObject` represents the Python interpreter ID type. | ||||||
|
|
||||||
| .. c:function:: PyObject* PyInterpreterID_New(int64_t id) | ||||||
|
|
||||||
| Returns a new interpreter ID object with the given *id*. | ||||||
|
|
||||||
| .. c:function:: PyInterpreterState* PyInterpreterID_LookUp(PyObject *requested_id) | ||||||
|
|
||||||
| Returns a :term:`borrowed reference` to the :c:type:`PyInterpreterState` interpreter state for the given interpreter ID object *requested_id*. | ||||||
| Fails with :exc:`RuntimeError` if the interpreter is not found. | ||||||
|
|
||||||
| .. c:function:: PyObject* PyInterpreterState_GetIDObject(PyInterpreterState *interp) | ||||||
|
|
||||||
| Returns a new interpreter ID object for the given interpreter state *interp*. | ||||||
|
|
||||||
| A Per-Interpreter GIL | ||||||
| --------------------- | ||||||
| Expand Down | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Added documentation for the ``PyUnstable_InterpreterState_GetMainModule`` | ||
| and ``PyInterpreterID`` C-API. Patch by Anthony Shaw. |
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI'm giving this some attention so that we can get it merged soon.
This section looks good so far
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.