Skip to content

Commit df5566c

Browse files
committed
Document the values of PyLong* macros.
1 parent c151684 commit df5566c

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

Doc/c-api/long.rst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -860,11 +860,21 @@ The :c:type:`PyLongWriter` API can be used to import an integer.
860860
Deprecated API
861861
^^^^^^^^^^^^^^
862862
863-
.. c:macro:: PyLong_BASE
863+
These macros are :term:`soft deprecated`. They represent internal constants
864+
for :c:type:`PyLongObject` instances.
865+
866+
Do not use these; use :c:func:`PyLong_GetNativeLayout` instead.
867+
864868
.. c:macro:: PyLong_SHIFT
865-
.. c:macro:: PyLong_MASK
866869
867-
These macros are :term:`soft deprecated`. They represent internal constants
868-
for :c:type:`PyLongObject` instances.
870+
This is currently equivalent to ``30``.
871+
872+
873+
.. c:macro:: PyLong_BASE
874+
875+
This is currently equivalent to :c:expr:`1 << PyLong_SHIFT`.
876+
877+
878+
.. c:macro:: PyLong_MASK
869879
870-
Do not use these; use :c:func:`PyLong_GetNativeLayout` instead.
880+
This is currently equivalent to :c:expr:`PyLong_BASE - 1`

0 commit comments

Comments
 (0)