@@ -639,7 +639,7 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
639
639
int overflow ;
640
640
641
641
/* Test that overflow is set properly for a large value. */
642
- /* num is a number larger than PY_LLONG_MAX on a typical machine. */
642
+ /* num is a number larger than LLONG_MAX on a typical machine. */
643
643
num = PyLong_FromString ("FFFFFFFFFFFFFFFFFFFFFFFF" , NULL , 16 );
644
644
if (num == NULL )
645
645
return NULL ;
@@ -655,8 +655,8 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
655
655
return raiseTestError ("test_long_long_and_overflow" ,
656
656
"overflow was not set to 1" );
657
657
658
- /* Same again, with num = PY_LLONG_MAX + 1 */
659
- num = PyLong_FromLongLong (PY_LLONG_MAX );
658
+ /* Same again, with num = LLONG_MAX + 1 */
659
+ num = PyLong_FromLongLong (LLONG_MAX );
660
660
if (num == NULL )
661
661
return NULL ;
662
662
one = PyLong_FromLong (1L );
@@ -683,7 +683,7 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
683
683
"overflow was not set to 1" );
684
684
685
685
/* Test that overflow is set properly for a large negative value. */
686
- /* num is a number smaller than PY_LLONG_MIN on a typical platform */
686
+ /* num is a number smaller than LLONG_MIN on a typical platform */
687
687
num = PyLong_FromString ("-FFFFFFFFFFFFFFFFFFFFFFFF" , NULL , 16 );
688
688
if (num == NULL )
689
689
return NULL ;
@@ -699,8 +699,8 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
699
699
return raiseTestError ("test_long_long_and_overflow" ,
700
700
"overflow was not set to -1" );
701
701
702
- /* Same again, with num = PY_LLONG_MIN - 1 */
703
- num = PyLong_FromLongLong (PY_LLONG_MIN );
702
+ /* Same again, with num = LLONG_MIN - 1 */
703
+ num = PyLong_FromLongLong (LLONG_MIN );
704
704
if (num == NULL )
705
705
return NULL ;
706
706
one = PyLong_FromLong (1L );
@@ -757,32 +757,32 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
757
757
return raiseTestError ("test_long_long_and_overflow" ,
758
758
"overflow was set incorrectly" );
759
759
760
- num = PyLong_FromLongLong (PY_LLONG_MAX );
760
+ num = PyLong_FromLongLong (LLONG_MAX );
761
761
if (num == NULL )
762
762
return NULL ;
763
763
overflow = 1234 ;
764
764
value = PyLong_AsLongLongAndOverflow (num , & overflow );
765
765
Py_DECREF (num );
766
766
if (value == -1 && PyErr_Occurred ())
767
767
return NULL ;
768
- if (value != PY_LLONG_MAX )
768
+ if (value != LLONG_MAX )
769
769
return raiseTestError ("test_long_long_and_overflow" ,
770
- "expected return value PY_LLONG_MAX " );
770
+ "expected return value LLONG_MAX " );
771
771
if (overflow != 0 )
772
772
return raiseTestError ("test_long_long_and_overflow" ,
773
773
"overflow was not cleared" );
774
774
775
- num = PyLong_FromLongLong (PY_LLONG_MIN );
775
+ num = PyLong_FromLongLong (LLONG_MIN );
776
776
if (num == NULL )
777
777
return NULL ;
778
778
overflow = 0 ;
779
779
value = PyLong_AsLongLongAndOverflow (num , & overflow );
780
780
Py_DECREF (num );
781
781
if (value == -1 && PyErr_Occurred ())
782
782
return NULL ;
783
- if (value != PY_LLONG_MIN )
783
+ if (value != LLONG_MIN )
784
784
return raiseTestError ("test_long_long_and_overflow" ,
785
- "expected return value PY_LLONG_MIN " );
785
+ "expected return value LLONG_MIN " );
786
786
if (overflow != 0 )
787
787
return raiseTestError ("test_long_long_and_overflow" ,
788
788
"overflow was not cleared" );
@@ -6710,9 +6710,9 @@ PyInit__testcapi(void)
6710
6710
PyModule_AddObject (m , "FLT_MIN" , PyFloat_FromDouble (FLT_MIN ));
6711
6711
PyModule_AddObject (m , "DBL_MAX" , PyFloat_FromDouble (DBL_MAX ));
6712
6712
PyModule_AddObject (m , "DBL_MIN" , PyFloat_FromDouble (DBL_MIN ));
6713
- PyModule_AddObject (m , "LLONG_MAX" , PyLong_FromLongLong (PY_LLONG_MAX ));
6714
- PyModule_AddObject (m , "LLONG_MIN" , PyLong_FromLongLong (PY_LLONG_MIN ));
6715
- PyModule_AddObject (m , "ULLONG_MAX" , PyLong_FromUnsignedLongLong (PY_ULLONG_MAX ));
6713
+ PyModule_AddObject (m , "LLONG_MAX" , PyLong_FromLongLong (LLONG_MAX ));
6714
+ PyModule_AddObject (m , "LLONG_MIN" , PyLong_FromLongLong (LLONG_MIN ));
6715
+ PyModule_AddObject (m , "ULLONG_MAX" , PyLong_FromUnsignedLongLong (ULLONG_MAX ));
6716
6716
PyModule_AddObject (m , "PY_SSIZE_T_MAX" , PyLong_FromSsize_t (PY_SSIZE_T_MAX ));
6717
6717
PyModule_AddObject (m , "PY_SSIZE_T_MIN" , PyLong_FromSsize_t (PY_SSIZE_T_MIN ));
6718
6718
PyModule_AddObject (m , "SIZEOF_PYGC_HEAD" , PyLong_FromSsize_t (sizeof (PyGC_Head )));
0 commit comments