Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document Py_LL and Py_ULL.
  • Loading branch information
ZeroIntensity committed Jan 27, 2026
commit fa005aff1bb932a5a50c0542dd208ea4243f2cef
18 changes: 18 additions & 0 deletions Doc/c-api/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,16 @@ complete listing.
Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the
command line (see :c:member:`PyConfig.use_environment`).

.. c:macro:: Py_LL(number)

Use *number* as a :c:type:`long long` integer literal.

This usally expands to *number* followed by ``LL``, but will expand to some
compiler-specific suffixes (such as ``I64``) on older compilers.

In modern versions of Python, this macro is not very useful, as C99 and
later require the ``LL`` suffix to be valid for an integer.

.. c:macro:: Py_LOCAL(type)

Declare a function returning the specified *type* using a fast-calling
Expand Down Expand Up @@ -328,6 +338,14 @@ complete listing.

.. versionadded:: 3.4

.. c:macro:: Py_ULL(number)

Similar to :c:macro:`Py_LL`, but *number* will be a :c:type:`unsigned long long`
literal instead. This is done by appending ``U`` to the result of ``Py_LL``.

In modern versions of Python, this macro is not very useful, as C99 and
later require the ``ULL``/``LLU`` suffix to be valid for an integer.
Comment thread
ZeroIntensity marked this conversation as resolved.
Outdated

.. c:macro:: Py_UNREACHABLE()

Use this when you have a code path that cannot be reached by design.
Expand Down