GH-101291: Add warning to "what's new" that `PyLongObject` internals have changed. (GH-107388)

This commit is contained in:
Mark Shannon 2023-07-28 17:07:33 +01:00 committed by GitHub
parent 2aaa83d5f5
commit 1ee605c588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -1865,6 +1865,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
----------