diff options
Diffstat (limited to 'Objects/stringlib')
-rw-r--r-- | Objects/stringlib/formatter.h | 2 | ||||
-rw-r--r-- | Objects/stringlib/string_format.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Objects/stringlib/formatter.h b/Objects/stringlib/formatter.h index ee0971d..b4f6e3c 100644 --- a/Objects/stringlib/formatter.h +++ b/Objects/stringlib/formatter.h @@ -469,7 +469,7 @@ format_long_internal(PyObject *value, const InternalFormatSpec *format) /* taken from unicodeobject.c formatchar() */ /* Integer input truncated to a character */ - x = PyInt_AsLong(value); + x = PyLong_AsLong(value); if (x == -1 && PyErr_Occurred()) goto done; #ifdef Py_UNICODE_WIDE diff --git a/Objects/stringlib/string_format.h b/Objects/stringlib/string_format.h index b771149..10d150f 100644 --- a/Objects/stringlib/string_format.h +++ b/Objects/stringlib/string_format.h @@ -204,7 +204,7 @@ static PyObject * getitem_idx(PyObject *obj, Py_ssize_t idx) { PyObject *newobj; - PyObject *idx_obj = PyInt_FromSsize_t(idx); + PyObject *idx_obj = PyLong_FromSsize_t(idx); if (idx_obj == NULL) return NULL; newobj = PyObject_GetItem(obj, idx_obj); @@ -1160,7 +1160,7 @@ fieldnameiter_next(fieldnameiterobject *it) /* either an integer or a string */ if (idx != -1) - obj = PyInt_FromSsize_t(idx); + obj = PyLong_FromSsize_t(idx); else obj = SubString_new_object(&name); if (obj == NULL) @@ -1245,7 +1245,7 @@ formatter_field_name_split(PyUnicodeObject *self) /* first becomes an integer, if possible; else a string */ if (first_idx != -1) - first_obj = PyInt_FromSsize_t(first_idx); + first_obj = PyLong_FromSsize_t(first_idx); else /* convert "first" into a string object */ first_obj = SubString_new_object(&first); |