@@ -637,7 +637,7 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
637
637
int overflow ;
638
638
639
639
/* Test that overflow is set properly for a large value. */
640
- /* num is a number larger than PY_LLONG_MAX on a typical machine. */
640
+ /* num is a number larger than LLONG_MAX on a typical machine. */
641
641
num = PyLong_FromString ("FFFFFFFFFFFFFFFFFFFFFFFF" , NULL , 16 );
642
642
if (num == NULL )
643
643
return NULL ;
@@ -653,8 +653,8 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
653
653
return raiseTestError ("test_long_long_and_overflow" ,
654
654
"overflow was not set to 1" );
655
655
656
- /* Same again, with num = PY_LLONG_MAX + 1 */
657
- num = PyLong_FromLongLong (PY_LLONG_MAX );
656
+ /* Same again, with num = LLONG_MAX + 1 */
657
+ num = PyLong_FromLongLong (LLONG_MAX );
658
658
if (num == NULL )
659
659
return NULL ;
660
660
one = PyLong_FromLong (1L );
@@ -681,7 +681,7 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
681
681
"overflow was not set to 1" );
682
682
683
683
/* Test that overflow is set properly for a large negative value. */
684
- /* num is a number smaller than PY_LLONG_MIN on a typical platform */
684
+ /* num is a number smaller than LLONG_MIN on a typical platform */
685
685
num = PyLong_FromString ("-FFFFFFFFFFFFFFFFFFFFFFFF" , NULL , 16 );
686
686
if (num == NULL )
687
687
return NULL ;
@@ -697,8 +697,8 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
697
697
return raiseTestError ("test_long_long_and_overflow" ,
698
698
"overflow was not set to -1" );
699
699
700
- /* Same again, with num = PY_LLONG_MIN - 1 */
701
- num = PyLong_FromLongLong (PY_LLONG_MIN );
700
+ /* Same again, with num = LLONG_MIN - 1 */
701
+ num = PyLong_FromLongLong (LLONG_MIN );
702
702
if (num == NULL )
703
703
return NULL ;
704
704
one = PyLong_FromLong (1L );
@@ -755,32 +755,32 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
755
755
return raiseTestError ("test_long_long_and_overflow" ,
756
756
"overflow was set incorrectly" );
757
757
758
- num = PyLong_FromLongLong (PY_LLONG_MAX );
758
+ num = PyLong_FromLongLong (LLONG_MAX );
759
759
if (num == NULL )
760
760
return NULL ;
761
761
overflow = 1234 ;
762
762
value = PyLong_AsLongLongAndOverflow (num , & overflow );
763
763
Py_DECREF (num );
764
764
if (value == -1 && PyErr_Occurred ())
765
765
return NULL ;
766
- if (value != PY_LLONG_MAX )
766
+ if (value != LLONG_MAX )
767
767
return raiseTestError ("test_long_long_and_overflow" ,
768
- "expected return value PY_LLONG_MAX " );
768
+ "expected return value LLONG_MAX " );
769
769
if (overflow != 0 )
770
770
return raiseTestError ("test_long_long_and_overflow" ,
771
771
"overflow was not cleared" );
772
772
773
- num = PyLong_FromLongLong (PY_LLONG_MIN );
773
+ num = PyLong_FromLongLong (LLONG_MIN );
774
774
if (num == NULL )
775
775
return NULL ;
776
776
overflow = 0 ;
777
777
value = PyLong_AsLongLongAndOverflow (num , & overflow );
778
778
Py_DECREF (num );
779
779
if (value == -1 && PyErr_Occurred ())
780
780
return NULL ;
781
- if (value != PY_LLONG_MIN )
781
+ if (value != LLONG_MIN )
782
782
return raiseTestError ("test_long_long_and_overflow" ,
783
- "expected return value PY_LLONG_MIN " );
783
+ "expected return value LLONG_MIN " );
784
784
if (overflow != 0 )
785
785
return raiseTestError ("test_long_long_and_overflow" ,
786
786
"overflow was not cleared" );
@@ -6109,9 +6109,9 @@ PyInit__testcapi(void)
6109
6109
PyModule_AddObject (m , "FLT_MIN" , PyFloat_FromDouble (FLT_MIN ));
6110
6110
PyModule_AddObject (m , "DBL_MAX" , PyFloat_FromDouble (DBL_MAX ));
6111
6111
PyModule_AddObject (m , "DBL_MIN" , PyFloat_FromDouble (DBL_MIN ));
6112
- PyModule_AddObject (m , "LLONG_MAX" , PyLong_FromLongLong (PY_LLONG_MAX ));
6113
- PyModule_AddObject (m , "LLONG_MIN" , PyLong_FromLongLong (PY_LLONG_MIN ));
6114
- PyModule_AddObject (m , "ULLONG_MAX" , PyLong_FromUnsignedLongLong (PY_ULLONG_MAX ));
6112
+ PyModule_AddObject (m , "LLONG_MAX" , PyLong_FromLongLong (LLONG_MAX ));
6113
+ PyModule_AddObject (m , "LLONG_MIN" , PyLong_FromLongLong (LLONG_MIN ));
6114
+ PyModule_AddObject (m , "ULLONG_MAX" , PyLong_FromUnsignedLongLong (ULLONG_MAX ));
6115
6115
PyModule_AddObject (m , "PY_SSIZE_T_MAX" , PyLong_FromSsize_t (PY_SSIZE_T_MAX ));
6116
6116
PyModule_AddObject (m , "PY_SSIZE_T_MIN" , PyLong_FromSsize_t (PY_SSIZE_T_MIN ));
6117
6117
PyModule_AddObject (m , "SIZEOF_PYGC_HEAD" , PyLong_FromSsize_t (sizeof (PyGC_Head )));
0 commit comments