diff options
author | Mark Shannon <mark@hotpy.org> | 2023-01-30 10:03:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 10:03:04 (GMT) |
commit | c1b1f51cd1632f0b77dacd43092fb44ed5e053a9 (patch) | |
tree | da815b0f6e2daddbb013ce2383837c61b3675201 /Include/cpython | |
parent | f5a3d91b6c56ddff4644b5a5ac34d8c6d23d7c79 (diff) | |
download | cpython-c1b1f51cd1632f0b77dacd43092fb44ed5e053a9.zip cpython-c1b1f51cd1632f0b77dacd43092fb44ed5e053a9.tar.gz cpython-c1b1f51cd1632f0b77dacd43092fb44ed5e053a9.tar.bz2 |
GH-101291: Refactor the `PyLongObject` struct into object header and PyLongValue struct. (GH-101292)
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/longintrepr.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Include/cpython/longintrepr.h b/Include/cpython/longintrepr.h index 6d52427..810daa8 100644 --- a/Include/cpython/longintrepr.h +++ b/Include/cpython/longintrepr.h @@ -79,9 +79,14 @@ typedef long stwodigits; /* signed variant of twodigits */ aware that ints abuse ob_size's sign bit. */ -struct _longobject { - PyObject_VAR_HEAD +typedef struct _PyLongValue { + Py_ssize_t ob_size; /* Number of items in variable part */ digit ob_digit[1]; +} _PyLongValue; + +struct _longobject { + PyObject_HEAD + _PyLongValue long_value; }; PyAPI_FUNC(PyLongObject *) _PyLong_New(Py_ssize_t); |