Merge 3.6.

This commit is contained in:
Stefan Krah 2017-01-09 13:12:09 +01:00
commit a40a3f35eb
1 changed files with 7 additions and 7 deletions

View File

@ -1118,12 +1118,12 @@ context_getattr(PyObject *self, PyObject *name)
PyObject *retval; PyObject *retval;
if (PyUnicode_Check(name)) { if (PyUnicode_Check(name)) {
if (_PyUnicode_EqualToASCIIString(name, "traps")) { if (PyUnicode_CompareWithASCIIString(name, "traps") == 0) {
retval = ((PyDecContextObject *)self)->traps; retval = ((PyDecContextObject *)self)->traps;
Py_INCREF(retval); Py_INCREF(retval);
return retval; return retval;
} }
if (_PyUnicode_EqualToASCIIString(name, "flags")) { if (PyUnicode_CompareWithASCIIString(name, "flags") == 0) {
retval = ((PyDecContextObject *)self)->flags; retval = ((PyDecContextObject *)self)->flags;
Py_INCREF(retval); Py_INCREF(retval);
return retval; return retval;
@ -1143,10 +1143,10 @@ context_setattr(PyObject *self, PyObject *name, PyObject *value)
} }
if (PyUnicode_Check(name)) { if (PyUnicode_Check(name)) {
if (_PyUnicode_EqualToASCIIString(name, "traps")) { if (PyUnicode_CompareWithASCIIString(name, "traps") == 0) {
return context_settraps_dict(self, value); return context_settraps_dict(self, value);
} }
if (_PyUnicode_EqualToASCIIString(name, "flags")) { if (PyUnicode_CompareWithASCIIString(name, "flags") == 0) {
return context_setstatus_dict(self, value); return context_setstatus_dict(self, value);
} }
} }
@ -2449,14 +2449,14 @@ dectuple_as_str(PyObject *dectuple)
tmp = PyTuple_GET_ITEM(dectuple, 2); tmp = PyTuple_GET_ITEM(dectuple, 2);
if (PyUnicode_Check(tmp)) { if (PyUnicode_Check(tmp)) {
/* special */ /* special */
if (_PyUnicode_EqualToASCIIString(tmp, "F")) { if (PyUnicode_CompareWithASCIIString(tmp, "F") == 0) {
strcat(sign_special, "Inf"); strcat(sign_special, "Inf");
is_infinite = 1; is_infinite = 1;
} }
else if (_PyUnicode_EqualToASCIIString(tmp, "n")) { else if (PyUnicode_CompareWithASCIIString(tmp, "n") == 0) {
strcat(sign_special, "NaN"); strcat(sign_special, "NaN");
} }
else if (_PyUnicode_EqualToASCIIString(tmp, "N")) { else if (PyUnicode_CompareWithASCIIString(tmp, "N") == 0) {
strcat(sign_special, "sNaN"); strcat(sign_special, "sNaN");
} }
else { else {