@@ -639,7 +639,7 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
639639 int overflow ;
640640
641641 /* 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. */
643643 num = PyLong_FromString ("FFFFFFFFFFFFFFFFFFFFFFFF" , NULL , 16 );
644644 if (num == NULL )
645645 return NULL ;
@@ -655,8 +655,8 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
655655 return raiseTestError ("test_long_long_and_overflow" ,
656656 "overflow was not set to 1" );
657657
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 );
660660 if (num == NULL )
661661 return NULL ;
662662 one = PyLong_FromLong (1L );
@@ -683,7 +683,7 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
683683 "overflow was not set to 1" );
684684
685685 /* 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 */
687687 num = PyLong_FromString ("-FFFFFFFFFFFFFFFFFFFFFFFF" , NULL , 16 );
688688 if (num == NULL )
689689 return NULL ;
@@ -699,8 +699,8 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
699699 return raiseTestError ("test_long_long_and_overflow" ,
700700 "overflow was not set to -1" );
701701
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 );
704704 if (num == NULL )
705705 return NULL ;
706706 one = PyLong_FromLong (1L );
@@ -757,32 +757,32 @@ test_long_long_and_overflow(PyObject *self, PyObject *Py_UNUSED(ignored))
757757 return raiseTestError ("test_long_long_and_overflow" ,
758758 "overflow was set incorrectly" );
759759
760- num = PyLong_FromLongLong (PY_LLONG_MAX );
760+ num = PyLong_FromLongLong (LLONG_MAX );
761761 if (num == NULL )
762762 return NULL ;
763763 overflow = 1234 ;
764764 value = PyLong_AsLongLongAndOverflow (num , & overflow );
765765 Py_DECREF (num );
766766 if (value == -1 && PyErr_Occurred ())
767767 return NULL ;
768- if (value != PY_LLONG_MAX )
768+ if (value != LLONG_MAX )
769769 return raiseTestError ("test_long_long_and_overflow" ,
770- "expected return value PY_LLONG_MAX " );
770+ "expected return value LLONG_MAX " );
771771 if (overflow != 0 )
772772 return raiseTestError ("test_long_long_and_overflow" ,
773773 "overflow was not cleared" );
774774
775- num = PyLong_FromLongLong (PY_LLONG_MIN );
775+ num = PyLong_FromLongLong (LLONG_MIN );
776776 if (num == NULL )
777777 return NULL ;
778778 overflow = 0 ;
779779 value = PyLong_AsLongLongAndOverflow (num , & overflow );
780780 Py_DECREF (num );
781781 if (value == -1 && PyErr_Occurred ())
782782 return NULL ;
783- if (value != PY_LLONG_MIN )
783+ if (value != LLONG_MIN )
784784 return raiseTestError ("test_long_long_and_overflow" ,
785- "expected return value PY_LLONG_MIN " );
785+ "expected return value LLONG_MIN " );
786786 if (overflow != 0 )
787787 return raiseTestError ("test_long_long_and_overflow" ,
788788 "overflow was not cleared" );
@@ -6710,9 +6710,9 @@ PyInit__testcapi(void)
67106710 PyModule_AddObject (m , "FLT_MIN" , PyFloat_FromDouble (FLT_MIN ));
67116711 PyModule_AddObject (m , "DBL_MAX" , PyFloat_FromDouble (DBL_MAX ));
67126712 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 ));
67166716 PyModule_AddObject (m , "PY_SSIZE_T_MAX" , PyLong_FromSsize_t (PY_SSIZE_T_MAX ));
67176717 PyModule_AddObject (m , "PY_SSIZE_T_MIN" , PyLong_FromSsize_t (PY_SSIZE_T_MIN ));
67186718 PyModule_AddObject (m , "SIZEOF_PYGC_HEAD" , PyLong_FromSsize_t (sizeof (PyGC_Head )));
0 commit comments