mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
GH-101291: Refactor the PyLongObject
struct into object header and PyLongValue struct. (GH-101292)
This commit is contained in:
parent
f5a3d91b6c
commit
c1b1f51cd1
13 changed files with 226 additions and 217 deletions
|
@ -149,9 +149,11 @@ extern "C" {
|
|||
|
||||
#define _PyLong_DIGIT_INIT(val) \
|
||||
{ \
|
||||
_PyVarObject_IMMORTAL_INIT(&PyLong_Type, \
|
||||
((val) == 0 ? 0 : ((val) > 0 ? 1 : -1))), \
|
||||
.ob_digit = { ((val) >= 0 ? (val) : -(val)) }, \
|
||||
.ob_base = _PyObject_IMMORTAL_INIT(&PyLong_Type), \
|
||||
.long_value = { \
|
||||
((val) == 0 ? 0 : ((val) > 0 ? 1 : -1)), \
|
||||
{ ((val) >= 0 ? (val) : -(val)) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
#define _PyBytes_SIMPLE_INIT(CH, LEN) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue