mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
gh-128863: Deprecate _PyLong_Sign() function (#129176)
Replace _PyLong_Sign() with PyLong_GetSign().
This commit is contained in:
parent
0093a31273
commit
1d485db953
9 changed files with 29 additions and 15 deletions
|
|
@ -2159,8 +2159,10 @@ save_long(PicklerObject *self, PyObject *obj)
|
|||
unsigned char *pdata;
|
||||
char header[5];
|
||||
int i;
|
||||
int sign = _PyLong_Sign(obj);
|
||||
|
||||
int sign;
|
||||
assert(PyLong_Check(obj));
|
||||
(void)PyLong_GetSign(obj, &sign);
|
||||
if (sign == 0) {
|
||||
header[0] = LONG1;
|
||||
header[1] = 0; /* It's 0 -- an empty bytestring. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue