@@ -1118,12 +1118,12 @@ context_getattr(PyObject *self, PyObject *name)
11181118 PyObject * retval ;
11191119
11201120 if (PyUnicode_Check (name )) {
1121- if (PyUnicode_CompareWithASCIIString (name , "traps" ) == 0 ) {
1121+ if (_PyUnicode_EqualToASCIIString (name , "traps" )) {
11221122 retval = ((PyDecContextObject * )self )-> traps ;
11231123 Py_INCREF (retval );
11241124 return retval ;
11251125 }
1126- if (PyUnicode_CompareWithASCIIString (name , "flags" ) == 0 ) {
1126+ if (_PyUnicode_EqualToASCIIString (name , "flags" )) {
11271127 retval = ((PyDecContextObject * )self )-> flags ;
11281128 Py_INCREF (retval );
11291129 return retval ;
@@ -1143,10 +1143,10 @@ context_setattr(PyObject *self, PyObject *name, PyObject *value)
11431143 }
11441144
11451145 if (PyUnicode_Check (name )) {
1146- if (PyUnicode_CompareWithASCIIString (name , "traps" ) == 0 ) {
1146+ if (_PyUnicode_EqualToASCIIString (name , "traps" )) {
11471147 return context_settraps_dict (self , value );
11481148 }
1149- if (PyUnicode_CompareWithASCIIString (name , "flags" ) == 0 ) {
1149+ if (_PyUnicode_EqualToASCIIString (name , "flags" )) {
11501150 return context_setstatus_dict (self , value );
11511151 }
11521152 }
@@ -2449,14 +2449,14 @@ dectuple_as_str(PyObject *dectuple)
24492449 tmp = PyTuple_GET_ITEM (dectuple , 2 );
24502450 if (PyUnicode_Check (tmp )) {
24512451 /* special */
2452- if (PyUnicode_CompareWithASCIIString (tmp , "F" ) == 0 ) {
2452+ if (_PyUnicode_EqualToASCIIString (tmp , "F" )) {
24532453 strcat (sign_special , "Inf" );
24542454 is_infinite = 1 ;
24552455 }
2456- else if (PyUnicode_CompareWithASCIIString (tmp , "n" ) == 0 ) {
2456+ else if (_PyUnicode_EqualToASCIIString (tmp , "n" )) {
24572457 strcat (sign_special , "NaN" );
24582458 }
2459- else if (PyUnicode_CompareWithASCIIString (tmp , "N" ) == 0 ) {
2459+ else if (_PyUnicode_EqualToASCIIString (tmp , "N" )) {
24602460 strcat (sign_special , "sNaN" );
24612461 }
24622462 else {
0 commit comments