Skip to content

Commit

Permalink
[3.12] GH-101291: Add warning to "what's new" that PyLongObject int…
Browse files Browse the repository at this point in the history
…ernals have changed. (GH-107388) (#107392)

(cherry picked from commit 1ee605c)

Co-authored-by: Mark Shannon <mark@hotpy.org>
  • Loading branch information
miss-islington and markshannon committed Jul 31, 2023
1 parent f66b992 commit 5f7862d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1867,6 +1867,17 @@ Porting to Python 3.12
subinterpreter that they don't support (or haven't yet been loaded in). See
:gh:`104668` for more info.

* :c:struct:`PyLongObject` has had its internals changed for better performance.
Although the internals of :c:struct:`PyLongObject` are private, they are used
by some extension modules.
The internal fields should no longer be accessed directly, instead the API
functions beginning ``PyLong_...`` should be used instead.
Two new *unstable* API functions are provided for efficient access to the
value of :c:struct:`PyLongObject`\s which fit into a single machine word:

* :c:func:`PyUnstable_Long_IsCompact`
* :c:func:`PyUnstable_Long_CompactValue`

Deprecated
----------

Expand Down

0 comments on commit 5f7862d

Please sign in to comment.