Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1969769

Browse files
committed
Cleanup
1 parent974d26b commit1969769

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

‎Include/internal/pycore_long.h‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -222,25 +222,15 @@ PyAPI_FUNC(int) _PyLong_Size_t_Converter(PyObject *, void *);
222222
* 2: Reserved for immortality bit
223223
* 3+ Unsigned digit count
224224
*/
225-
#defineSIGN_MASK3
225+
#defineSIGN_MASK_PyLong_SIGN_MASK
226226
#defineSIGN_ZERO 1
227227
#defineSIGN_NEGATIVE 2
228-
#defineNON_SIZE_BITS3
228+
#defineNON_SIZE_BITS_PyLong_NON_SIZE_BITS
229229

230-
/* The functions _PyLong_IsCompact and _PyLong_CompactValue are defined
231-
* in Include/cpython/longobject.h, since they need to be inline.
232-
*
233-
* "Compact" values have at least one bit to spare,
230+
/* "Compact" values have at least one bit to spare,
234231
* so that addition and subtraction can be performed on the values
235232
* without risk of overflow.
236-
*
237-
* The inline functions need tag bits.
238-
* For readability, rather than do `#define SIGN_MASK _PyLong_SIGN_MASK`
239-
* we define them to the numbers in both places and then assert that
240-
* they're the same.
241233
*/
242-
static_assert(SIGN_MASK==_PyLong_SIGN_MASK,"SIGN_MASK does not match _PyLong_SIGN_MASK");
243-
static_assert(NON_SIZE_BITS==_PyLong_NON_SIZE_BITS,"NON_SIZE_BITS does not match _PyLong_NON_SIZE_BITS");
244234

245235
/* All *compact" values are guaranteed to fit into
246236
* a Py_ssize_t with at least one bit to spare.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp