| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,6 +7,7 @@ Pending removal in Python 3.18 | |||
| 7 | 7 | * :c:func:`!_PyDict_GetItemStringWithError`: use :c:func:`PyDict_GetItemStringRef`. | |
| 8 | 8 | * :c:func:`!_PyDict_Pop()`: :c:func:`PyDict_Pop`. | |
| 9 | 9 | * :c:func:`!_PyLong_Sign()`: use :c:func:`PyLong_GetSign`. | |
| 10 | + * :c:func:`!_PyLong_New`: use :c:func:`PyLongWriter_Create`. | ||
| 10 | 11 | * :c:func:`!_PyThreadState_UncheckedGet`: use :c:func:`PyThreadState_GetUnchecked`. | |
| 11 | 12 | * :c:func:`!_PyUnicode_AsString`: use :c:func:`PyUnicode_AsUTF8`. | |
| 12 | 13 | * :c:func:`!_Py_HashPointer`: use :c:func:`Py_HashPointer`. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1396,6 +1396,7 @@ Deprecated | |||
| 1396 | 1396 | * :c:func:`!_PyDict_GetItemStringWithError`: use :c:func:`PyDict_GetItemStringRef`. | |
| 1397 | 1397 | * :c:func:`!_PyDict_Pop()`: use :c:func:`PyDict_Pop`. | |
| 1398 | 1398 | * :c:func:`!_PyLong_Sign()`: use :c:func:`PyLong_GetSign`. | |
| 1399 | + * :c:func:`!_PyLong_New`: use :c:func:`PyLongWriter_Create`. | ||
| 1399 | 1400 | * :c:func:`!_PyThreadState_UncheckedGet`: use :c:func:`PyThreadState_GetUnchecked`. | |
| 1400 | 1401 | * :c:func:`!_PyUnicode_AsString`: use :c:func:`PyUnicode_AsUTF8`. | |
| 1401 | 1402 | * :c:func:`!_Py_HashPointer`: use :c:func:`Py_HashPointer`. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -100,7 +100,7 @@ struct _longobject { | |||
| 100 | 100 | _PyLongValue long_value; | |
| 101 | 101 | }; | |
| 102 | 102 | ||
| 103 | - PyAPI_FUNC(PyLongObject*) _PyLong_New(Py_ssize_t); | ||
| 103 | + Py_DEPRECATED(3.14) PyAPI_FUNC(PyLongObject*) _PyLong_New(Py_ssize_t); | ||
| 104 | 104 | ||
| 105 | 105 | // Return a copy of src. | |
| 106 | 106 | PyAPI_FUNC(PyObject*) _PyLong_Copy(PyLongObject *src); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,6 +5,7 @@ Python 3.18: | |||
| 5 | 5 | * :c:func:`!_PyDict_GetItemStringWithError`: use :c:func:`PyDict_GetItemStringRef`. | |
| 6 | 6 | * :c:func:`!_PyDict_Pop()`: use :c:func:`PyDict_Pop`. | |
| 7 | 7 | * :c:func:`!_PyLong_Sign()`: use :c:func:`PyLong_GetSign`. | |
| 8 | + * :c:func:`!_PyLong_New`: use :c:func:`PyLongWriter_Create`. | ||
| 8 | 9 | * :c:func:`!_PyThreadState_UncheckedGet`: use :c:func:`PyThreadState_GetUnchecked`. | |
| 9 | 10 | * :c:func:`!_PyUnicode_AsString`: use :c:func:`PyUnicode_AsUTF8`. | |
| 10 | 11 | * :c:func:`!_Py_HashPointer`: use :c:func:`Py_HashPointer`. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -152,8 +152,8 @@ long_normalize(PyLongObject *v) | |||
| 152 | 152 | # define MAX_LONG_DIGITS ((INT64_MAX-1) / PyLong_SHIFT) | |
| 153 | 153 | #endif | |
| 154 | 154 | ||
| 155 | - PyLongObject * | ||
| 156 | - _PyLong_New(Py_ssize_t size) | ||
| 155 | + static PyLongObject * | ||
| 156 | + long_alloc(Py_ssize_t size) | ||
| 157 | 157 | { | |
| 158 | 158 | assert(size >= 0); | |
| 159 | 159 | PyLongObject *result = NULL; | |
@@ -190,14 +190,20 @@ _PyLong_New(Py_ssize_t size) | |||
| 190 | 190 | return result; | |
| 191 | 191 | } | |
| 192 | 192 | ||
| 193 | + PyLongObject * | ||
| 194 | + _PyLong_New(Py_ssize_t size) | ||
| 195 | + { | ||
| 196 | + return long_alloc(size); | ||
| 197 | + } | ||
| 198 | + | ||
| 193 | 199 | PyLongObject * | |
| 194 | 200 | _PyLong_FromDigits(int negative, Py_ssize_t digit_count, digit *digits) | |
| 195 | 201 | { | |
| 196 | 202 | assert(digit_count >= 0); | |
| 197 | 203 | if (digit_count == 0) { | |
| 198 | 204 | return (PyLongObject *)_PyLong_GetZero(); | |
| 199 | 205 | } | |
| 200 | - PyLongObject *result = _PyLong_New(digit_count); | ||
| 206 | + PyLongObject *result = long_alloc(digit_count); | ||
| 201 | 207 | if (result == NULL) { | |
| 202 | 208 | PyErr_NoMemory(); | |
| 203 | 209 | return NULL; | |
@@ -268,7 +274,7 @@ _PyLong_FromLarge(stwodigits ival) | |||
| 268 | 274 | ++ndigits; | |
| 269 | 275 | t >>= PyLong_SHIFT; | |
| 270 | 276 | } | |
| 271 | - PyLongObject *v = _PyLong_New(ndigits); | ||
| 277 | + PyLongObject *v = long_alloc(ndigits); | ||
| 272 | 278 | if (v != NULL) { | |
| 273 | 279 | digit *p = v->long_value.ob_digit; | |
| 274 | 280 | _PyLong_SetSignAndDigitCount(v, sign, ndigits); | |
@@ -341,7 +347,7 @@ PyLong_FromLong(long ival) | |||
| 341 | 347 | } | |
| 342 | 348 | ||
| 343 | 349 | /* Construct output value. */ | |
| 344 | - v = _PyLong_New(ndigits); | ||
| 350 | + v = long_alloc(ndigits); | ||
| 345 | 351 | if (v != NULL) { | |
| 346 | 352 | digit *p = v->long_value.ob_digit; | |
| 347 | 353 | _PyLong_SetSignAndDigitCount(v, ival < 0 ? -1 : 1, ndigits); | |
@@ -366,7 +372,7 @@ PyLong_FromLong(long ival) | |||
| 366 | 372 | ++ndigits; \ | |
| 367 | 373 | t >>= PyLong_SHIFT; \ | |
| 368 | 374 | } \ | |
| 369 | - PyLongObject *v = _PyLong_New(ndigits); \ | ||
| 375 | + PyLongObject *v = long_alloc(ndigits); \ | ||
| 370 | 376 | if (v == NULL) { \ | |
| 371 | 377 | return NULL; \ | |
| 372 | 378 | } \ | |
@@ -443,7 +449,7 @@ PyLong_FromDouble(double dval) | |||
| 443 | 449 | frac = frexp(dval, &expo); /* dval = frac*2**expo; 0.0 <= frac < 1.0 */ | |
| 444 | 450 | assert(expo > 0); | |
| 445 | 451 | ndig = (expo-1) / PyLong_SHIFT + 1; /* Number of 'digits' in result */ | |
| 446 | - v = _PyLong_New(ndig); | ||
| 452 | + v = long_alloc(ndig); | ||
| 447 | 453 | if (v == NULL) | |
| 448 | 454 | return NULL; | |
| 449 | 455 | frac = ldexp(frac, (expo-1) % PyLong_SHIFT + 1); | |
@@ -952,7 +958,7 @@ _PyLong_FromByteArray(const unsigned char* bytes, size_t n, | |||
| 952 | 958 | return NULL; | |
| 953 | 959 | } | |
| 954 | 960 | ndigits = (numsignificantbytes * 8 + PyLong_SHIFT - 1) / PyLong_SHIFT; | |
| 955 | - v = _PyLong_New(ndigits); | ||
| 961 | + v = long_alloc(ndigits); | ||
| 956 | 962 | if (v == NULL) | |
| 957 | 963 | return NULL; | |
| 958 | 964 | ||
@@ -1482,7 +1488,7 @@ PyLong_FromLongLong(long long ival) | |||
| 1482 | 1488 | } | |
| 1483 | 1489 | ||
| 1484 | 1490 | /* Construct output value. */ | |
| 1485 | - v = _PyLong_New(ndigits); | ||
| 1491 | + v = long_alloc(ndigits); | ||
| 1486 | 1492 | if (v != NULL) { | |
| 1487 | 1493 | digit *p = v->long_value.ob_digit; | |
| 1488 | 1494 | _PyLong_SetSignAndDigitCount(v, ival < 0 ? -1 : 1, ndigits); | |
@@ -1525,7 +1531,7 @@ PyLong_FromSsize_t(Py_ssize_t ival) | |||
| 1525 | 1531 | ++ndigits; | |
| 1526 | 1532 | t >>= PyLong_SHIFT; | |
| 1527 | 1533 | } | |
| 1528 | - v = _PyLong_New(ndigits); | ||
| 1534 | + v = long_alloc(ndigits); | ||
| 1529 | 1535 | if (v != NULL) { | |
| 1530 | 1536 | digit *p = v->long_value.ob_digit; | |
| 1531 | 1537 | _PyLong_SetSignAndDigitCount(v, negative ? -1 : 1, ndigits); | |
@@ -2015,7 +2021,7 @@ divrem1(PyLongObject *a, digit n, digit *prem) | |||
| 2015 | 2021 | PyLongObject *z; | |
| 2016 | 2022 | ||
| 2017 | 2023 | assert(n > 0 && n <= PyLong_MASK); | |
| 2018 | - z = _PyLong_New(size); | ||
| 2024 | + z = long_alloc(size); | ||
| 2019 | 2025 | if (z == NULL) | |
| 2020 | 2026 | return NULL; | |
| 2021 | 2027 | *prem = inplace_divrem1(z->long_value.ob_digit, a->long_value.ob_digit, size, n); | |
@@ -2192,7 +2198,7 @@ long_to_decimal_string_internal(PyObject *aa, | |||
| 2192 | 2198 | (10 * PyLong_SHIFT - 33 * _PyLong_DECIMAL_SHIFT); | |
| 2193 | 2199 | assert(size_a < PY_SSIZE_T_MAX/2); | |
| 2194 | 2200 | size = 1 + size_a + size_a / d; | |
| 2195 | - scratch = _PyLong_New(size); | ||
| 2201 | + scratch = long_alloc(size); | ||
| 2196 | 2202 | if (scratch == NULL) | |
| 2197 | 2203 | return -1; | |
| 2198 | 2204 | ||
@@ -2635,7 +2641,7 @@ long_from_binary_base(const char *start, const char *end, Py_ssize_t digits, int | |||
| 2635 | 2641 | return 0; | |
| 2636 | 2642 | } | |
| 2637 | 2643 | n = (digits * bits_per_char + PyLong_SHIFT - 1) / PyLong_SHIFT; | |
| 2638 | - z = _PyLong_New(n); | ||
| 2644 | + z = long_alloc(n); | ||
| 2639 | 2645 | if (z == NULL) { | |
| 2640 | 2646 | *res = NULL; | |
| 2641 | 2647 | return 0; | |
@@ -2839,7 +2845,7 @@ long_from_non_binary_base(const char *start, const char *end, Py_ssize_t digits, | |||
| 2839 | 2845 | */ | |
| 2840 | 2846 | double fsize_z = (double)digits * log_base_BASE[base] + 1.0; | |
| 2841 | 2847 | if (fsize_z > (double)MAX_LONG_DIGITS) { | |
| 2842 | - /* The same exception as in _PyLong_New(). */ | ||
| 2848 | + /* The same exception as in long_alloc(). */ | ||
| 2843 | 2849 | PyErr_SetString(PyExc_OverflowError, | |
| 2844 | 2850 | "too many digits in integer"); | |
| 2845 | 2851 | *res = NULL; | |
@@ -2849,7 +2855,7 @@ long_from_non_binary_base(const char *start, const char *end, Py_ssize_t digits, | |||
| 2849 | 2855 | /* Uncomment next line to test exceedingly rare copy code */ | |
| 2850 | 2856 | /* size_z = 1; */ | |
| 2851 | 2857 | assert(size_z > 0); | |
| 2852 | - z = _PyLong_New(size_z); | ||
| 2858 | + z = long_alloc(size_z); | ||
| 2853 | 2859 | if (z == NULL) { | |
| 2854 | 2860 | *res = NULL; | |
| 2855 | 2861 | return 0; | |
@@ -2912,7 +2918,7 @@ long_from_non_binary_base(const char *start, const char *end, Py_ssize_t digits, | |||
| 2912 | 2918 | PyLongObject *tmp; | |
| 2913 | 2919 | /* Extremely rare. Get more space. */ | |
| 2914 | 2920 | assert(_PyLong_DigitCount(z) == size_z); | |
| 2915 | - tmp = _PyLong_New(size_z + 1); | ||
| 2921 | + tmp = long_alloc(size_z + 1); | ||
| 2916 | 2922 | if (tmp == NULL) { | |
| 2917 | 2923 | Py_DECREF(z); | |
| 2918 | 2924 | *res = NULL; | |
@@ -3333,12 +3339,12 @@ x_divrem(PyLongObject *v1, PyLongObject *w1, PyLongObject **prem) | |||
| 3333 | 3339 | size_v = _PyLong_DigitCount(v1); | |
| 3334 | 3340 | size_w = _PyLong_DigitCount(w1); | |
| 3335 | 3341 | assert(size_v >= size_w && size_w >= 2); /* Assert checks by div() */ | |
| 3336 | - v = _PyLong_New(size_v+1); | ||
| 3342 | + v = long_alloc(size_v+1); | ||
| 3337 | 3343 | if (v == NULL) { | |
| 3338 | 3344 | *prem = NULL; | |
| 3339 | 3345 | return NULL; | |
| 3340 | 3346 | } | |
| 3341 | - w = _PyLong_New(size_w); | ||
| 3347 | + w = long_alloc(size_w); | ||
| 3342 | 3348 | if (w == NULL) { | |
| 3343 | 3349 | Py_DECREF(v); | |
| 3344 | 3350 | *prem = NULL; | |
@@ -3360,7 +3366,7 @@ x_divrem(PyLongObject *v1, PyLongObject *w1, PyLongObject **prem) | |||
| 3360 | 3366 | at most (and usually exactly) k = size_v - size_w digits. */ | |
| 3361 | 3367 | k = size_v - size_w; | |
| 3362 | 3368 | assert(k >= 0); | |
| 3363 | - a = _PyLong_New(k); | ||
| 3369 | + a = long_alloc(k); | ||
| 3364 | 3370 | if (a == NULL) { | |
| 3365 | 3371 | Py_DECREF(w); | |
| 3366 | 3372 | Py_DECREF(v); | |
@@ -3758,7 +3764,7 @@ x_add(PyLongObject *a, PyLongObject *b) | |||
| 3758 | 3764 | size_a = size_b; | |
| 3759 | 3765 | size_b = size_temp; } | |
| 3760 | 3766 | } | |
| 3761 | - z = _PyLong_New(size_a+1); | ||
| 3767 | + z = long_alloc(size_a+1); | ||
| 3762 | 3768 | if (z == NULL) | |
| 3763 | 3769 | return NULL; | |
| 3764 | 3770 | for (i = 0; i < size_b; ++i) { | |
@@ -3807,7 +3813,7 @@ x_sub(PyLongObject *a, PyLongObject *b) | |||
| 3807 | 3813 | } | |
| 3808 | 3814 | size_a = size_b = i+1; | |
| 3809 | 3815 | } | |
| 3810 | - z = _PyLong_New(size_a); | ||
| 3816 | + z = long_alloc(size_a); | ||
| 3811 | 3817 | if (z == NULL) | |
| 3812 | 3818 | return NULL; | |
| 3813 | 3819 | for (i = 0; i < size_b; ++i) { | |
@@ -3932,7 +3938,7 @@ x_mul(PyLongObject *a, PyLongObject *b) | |||
| 3932 | 3938 | Py_ssize_t size_b = _PyLong_DigitCount(b); | |
| 3933 | 3939 | Py_ssize_t i; | |
| 3934 | 3940 | ||
| 3935 | - z = _PyLong_New(size_a + size_b); | ||
| 3941 | + z = long_alloc(size_a + size_b); | ||
| 3936 | 3942 | if (z == NULL) | |
| 3937 | 3943 | return NULL; | |
| 3938 | 3944 | ||
@@ -4042,9 +4048,9 @@ kmul_split(PyLongObject *n, | |||
| 4042 | 4048 | size_lo = Py_MIN(size_n, size); | |
| 4043 | 4049 | size_hi = size_n - size_lo; | |
| 4044 | 4050 | ||
| 4045 | - if ((hi = _PyLong_New(size_hi)) == NULL) | ||
| 4051 | + if ((hi = long_alloc(size_hi)) == NULL) | ||
| 4046 | 4052 | return -1; | |
| 4047 | - if ((lo = _PyLong_New(size_lo)) == NULL) { | ||
| 4053 | + if ((lo = long_alloc(size_lo)) == NULL) { | ||
| 4048 | 4054 | Py_DECREF(hi); | |
| 4049 | 4055 | return -1; | |
| 4050 | 4056 | } | |
@@ -4144,7 +4150,7 @@ k_mul(PyLongObject *a, PyLongObject *b) | |||
| 4144 | 4150 | */ | |
| 4145 | 4151 | ||
| 4146 | 4152 | /* 1. Allocate result space. */ | |
| 4147 | - ret = _PyLong_New(asize + bsize); | ||
| 4153 | + ret = long_alloc(asize + bsize); | ||
| 4148 | 4154 | if (ret == NULL) goto fail; | |
| 4149 | 4155 | #ifdef Py_DEBUG | |
| 4150 | 4156 | /* Fill with trash, to catch reference to uninitialized digits. */ | |
@@ -4294,13 +4300,13 @@ k_lopsided_mul(PyLongObject *a, PyLongObject *b) | |||
| 4294 | 4300 | assert(2 * asize <= bsize); | |
| 4295 | 4301 | ||
| 4296 | 4302 | /* Allocate result space, and zero it out. */ | |
| 4297 | - ret = _PyLong_New(asize + bsize); | ||
| 4303 | + ret = long_alloc(asize + bsize); | ||
| 4298 | 4304 | if (ret == NULL) | |
| 4299 | 4305 | return NULL; | |
| 4300 | 4306 | memset(ret->long_value.ob_digit, 0, _PyLong_DigitCount(ret) * sizeof(digit)); | |
| 4301 | 4307 | ||
| 4302 | 4308 | /* Successive slices of b are copied into bslice. */ | |
| 4303 | - bslice = _PyLong_New(asize); | ||
| 4309 | + bslice = long_alloc(asize); | ||
| 4304 | 4310 | if (bslice == NULL) | |
| 4305 | 4311 | goto fail; | |
| 4306 | 4312 | ||
@@ -4766,7 +4772,7 @@ long_true_divide(PyObject *v, PyObject *w) | |||
| 4766 | 4772 | "intermediate overflow during division"); | |
| 4767 | 4773 | goto error; | |
| 4768 | 4774 | } | |
| 4769 | - x = _PyLong_New(a_size + shift_digits + 1); | ||
| 4775 | + x = long_alloc(a_size + shift_digits + 1); | ||
| 4770 | 4776 | if (x == NULL) | |
| 4771 | 4777 | goto error; | |
| 4772 | 4778 | for (i = 0; i < shift_digits; i++) | |
@@ -4780,7 +4786,7 @@ long_true_divide(PyObject *v, PyObject *w) | |||
| 4780 | 4786 | digit rem; | |
| 4781 | 4787 | /* x = a >> shift */ | |
| 4782 | 4788 | assert(a_size >= shift_digits); | |
| 4783 | - x = _PyLong_New(a_size - shift_digits); | ||
| 4789 | + x = long_alloc(a_size - shift_digits); | ||
| 4784 | 4790 | if (x == NULL) | |
| 4785 | 4791 | goto error; | |
| 4786 | 4792 | rem = v_rshift(x->long_value.ob_digit, a->long_value.ob_digit + shift_digits, | |
@@ -5360,7 +5366,7 @@ long_rshift1(PyLongObject *a, Py_ssize_t wordshift, digit remshift) | |||
| 5360 | 5366 | /* Shifting all the bits of 'a' out gives either -1 or 0. */ | |
| 5361 | 5367 | return PyLong_FromLong(-a_negative); | |
| 5362 | 5368 | } | |
| 5363 | - z = _PyLong_New(newsize); | ||
| 5369 | + z = long_alloc(newsize); | ||
| 5364 | 5370 | if (z == NULL) { | |
| 5365 | 5371 | return NULL; | |
| 5366 | 5372 | } | |
@@ -5475,7 +5481,7 @@ long_lshift1(PyLongObject *a, Py_ssize_t wordshift, digit remshift) | |||
| 5475 | 5481 | newsize = oldsize + wordshift; | |
| 5476 | 5482 | if (remshift) | |
| 5477 | 5483 | ++newsize; | |
| 5478 | - z = _PyLong_New(newsize); | ||
| 5484 | + z = long_alloc(newsize); | ||
| 5479 | 5485 | if (z == NULL) | |
| 5480 | 5486 | return NULL; | |
| 5481 | 5487 | if (_PyLong_IsNegative(a)) { | |
@@ -5590,7 +5596,7 @@ long_bitwise(PyLongObject *a, | |||
| 5590 | 5596 | size_a = _PyLong_DigitCount(a); | |
| 5591 | 5597 | nega = _PyLong_IsNegative(a); | |
| 5592 | 5598 | if (nega) { | |
| 5593 | - z = _PyLong_New(size_a); | ||
| 5599 | + z = long_alloc(size_a); | ||
| 5594 | 5600 | if (z == NULL) | |
| 5595 | 5601 | return NULL; | |
| 5596 | 5602 | v_complement(z->long_value.ob_digit, a->long_value.ob_digit, size_a); | |
@@ -5604,7 +5610,7 @@ long_bitwise(PyLongObject *a, | |||
| 5604 | 5610 | size_b = _PyLong_DigitCount(b); | |
| 5605 | 5611 | negb = _PyLong_IsNegative(b); | |
| 5606 | 5612 | if (negb) { | |
| 5607 | - z = _PyLong_New(size_b); | ||
| 5613 | + z = long_alloc(size_b); | ||
| 5608 | 5614 | if (z == NULL) { | |
| 5609 | 5615 | Py_DECREF(a); | |
| 5610 | 5616 | return NULL; | |
@@ -5648,7 +5654,7 @@ long_bitwise(PyLongObject *a, | |||
| 5648 | 5654 | ||
| 5649 | 5655 | /* We allow an extra digit if z is negative, to make sure that | |
| 5650 | 5656 | the final two's complement of z doesn't overflow. */ | |
| 5651 | - z = _PyLong_New(size_z + negz); | ||
| 5657 | + z = long_alloc(size_z + negz); | ||
| 5652 | 5658 | if (z == NULL) { | |
| 5653 | 5659 | Py_DECREF(a); | |
| 5654 | 5660 | Py_DECREF(b); | |
@@ -5846,7 +5852,7 @@ _PyLong_GCD(PyObject *aarg, PyObject *barg) | |||
| 5846 | 5852 | } | |
| 5847 | 5853 | else { | |
| 5848 | 5854 | alloc_a = size_a; | |
| 5849 | - c = _PyLong_New(size_a); | ||
| 5855 | + c = long_alloc(size_a); | ||
| 5850 | 5856 | if (c == NULL) | |
| 5851 | 5857 | goto error; | |
| 5852 | 5858 | } | |
@@ -5862,7 +5868,7 @@ _PyLong_GCD(PyObject *aarg, PyObject *barg) | |||
| 5862 | 5868 | } | |
| 5863 | 5869 | else { | |
| 5864 | 5870 | alloc_b = size_a; | |
| 5865 | - d = _PyLong_New(size_a); | ||
| 5871 | + d = long_alloc(size_a); | ||
| 5866 | 5872 | if (d == NULL) | |
| 5867 | 5873 | goto error; | |
| 5868 | 5874 | } | |
@@ -6910,7 +6916,7 @@ PyLongWriter_Create(int negative, Py_ssize_t ndigits, void **digits) | |||
| 6910 | 6916 | } | |
| 6911 | 6917 | assert(digits != NULL); | |
| 6912 | 6918 | ||
| 6913 | - PyLongObject *obj = _PyLong_New(ndigits); | ||
| 6919 | + PyLongObject *obj = long_alloc(ndigits); | ||
| 6914 | 6920 | if (obj == NULL) { | |
| 6915 | 6921 | goto error; | |
| 6916 | 6922 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments