FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.13] gh-141004: Document `PyLong_FromPid` and `PyLong_AsPid` (GH-141028) by ZeroIntensity · Pull Request #141143 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
22 changes: 22 additions & 0 deletions Doc/c-api/long.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,17 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
.. versionadded:: 3.13


.. c:macro:: PyLong_FromPid(pid)

Macro for creating a Python integer from a process identifier.

This can be defined as an alias to :c:func:`PyLong_FromLong` or
:c:func:`PyLong_FromLongLong`, depending on the size of the system's
PID type.

.. versionadded:: 3.2


.. c:function:: long PyLong_AsLong(PyObject *obj)

.. index::
Expand Down Expand Up @@ -369,6 +380,17 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate.


.. c:macro:: PyLong_AsPid(pid)

Macro for converting a Python integer into a process identifier.

This can be defined as an alias to :c:func:`PyLong_AsLong`,
:c:func:`PyLong_FromLongLong`, or :c:func:`PyLong_AsInt`, depending on the
size of the system's PID type.

.. versionadded:: 3.2


.. c:function:: Py_ssize_t PyLong_AsNativeBytes(PyObject *pylong, void* buffer, Py_ssize_t n_bytes, int flags)

Copy the Python integer value *pylong* to a native *buffer* of size
Expand Down
Loading

Back | FazBrowse Home | New Git URL