@@ -172,12 +172,6 @@ long_alloc(Py_ssize_t size)
172172 if (ndigits == 1 ) {
173173 result = (PyLongObject * )_Py_FREELIST_POP (PyLongObject , ints );
174174 }
175- else if (ndigits == 2 ) {
176- result = (PyLongObject * )_Py_FREELIST_POP (PyLongObject , ints2 );
177- }
178- else if (ndigits == 3 ) {
179- result = (PyLongObject * )_Py_FREELIST_POP (PyLongObject , ints3 );
180- }
181175 if (result == NULL ) {
182176 /* Number of bytes needed is: offsetof(PyLongObject, ob_digit) +
183177 sizeof(digit)*size. Previous incarnations of this code used
@@ -3650,15 +3644,6 @@ _PyLong_ExactDealloc(PyObject *self)
36503644 _Py_FREELIST_FREE (ints , self , PyObject_Free );
36513645 return ;
36523646 }
3653- Py_ssize_t ndigits = _PyLong_DigitCount ((PyLongObject * )self );
3654- if (ndigits == 2 ) {
3655- _Py_FREELIST_FREE (ints2 , self , PyObject_Free );
3656- return ;
3657- }
3658- if (ndigits == 3 ) {
3659- _Py_FREELIST_FREE (ints3 , self , PyObject_Free );
3660- return ;
3661- }
36623647 PyObject_Free (self );
36633648}
36643649
@@ -3675,20 +3660,9 @@ long_dealloc(PyObject *self)
36753660 _Py_SetImmortal (self );
36763661 return ;
36773662 }
3678- if (PyLong_CheckExact (self )) {
3679- if (_PyLong_IsCompact ((PyLongObject * )self )) {
3680- _Py_FREELIST_FREE (ints , self , PyObject_Free );
3681- return ;
3682- }
3683- Py_ssize_t ndigits = _PyLong_DigitCount ((PyLongObject * )self );
3684- if (ndigits == 2 ) {
3685- _Py_FREELIST_FREE (ints2 , self , PyObject_Free );
3686- return ;
3687- }
3688- if (ndigits == 3 ) {
3689- _Py_FREELIST_FREE (ints3 , self , PyObject_Free );
3690- return ;
3691- }
3663+ if (PyLong_CheckExact (self ) && _PyLong_IsCompact ((PyLongObject * )self )) {
3664+ _Py_FREELIST_FREE (ints , self , PyObject_Free );
3665+ return ;
36923666 }
36933667 Py_TYPE (self )-> tp_free (self );
36943668}
0 commit comments