diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-02 14:31:20 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-02 14:31:20 (GMT) |
commit | 217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2 (patch) | |
tree | 4737b4a91359c94953623ab9ee297e9a90f319e4 /Objects/stringobject.c | |
parent | 1a3284ed69d545e4ef59869998cb8c29233a45fa (diff) | |
download | cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.zip cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.gz cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.bz2 |
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 887b28a..1c0a70d 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -803,7 +803,7 @@ string_item(PyStringObject *a, register Py_ssize_t i) PyErr_SetString(PyExc_IndexError, "string index out of range"); return NULL; } - return PyInt_FromLong((unsigned char)a->ob_sval[i]); + return PyLong_FromLong((unsigned char)a->ob_sval[i]); } static PyObject* @@ -922,7 +922,7 @@ string_subscript(PyStringObject* self, PyObject* item) "string index out of range"); return NULL; } - return PyInt_FromLong((unsigned char)self->ob_sval[i]); + return PyLong_FromLong((unsigned char)self->ob_sval[i]); } else if (PySlice_Check(item)) { Py_ssize_t start, stop, step, slicelength, cur, i; @@ -1586,7 +1586,7 @@ string_find(PyStringObject *self, PyObject *args) Py_ssize_t result = string_find_internal(self, args, +1); if (result == -2) return NULL; - return PyInt_FromSsize_t(result); + return PyLong_FromSsize_t(result); } @@ -1606,7 +1606,7 @@ string_index(PyStringObject *self, PyObject *args) "substring not found"); return NULL; } - return PyInt_FromSsize_t(result); + return PyLong_FromSsize_t(result); } @@ -1625,7 +1625,7 @@ string_rfind(PyStringObject *self, PyObject *args) Py_ssize_t result = string_find_internal(self, args, -1); if (result == -2) return NULL; - return PyInt_FromSsize_t(result); + return PyLong_FromSsize_t(result); } @@ -1645,7 +1645,7 @@ string_rindex(PyStringObject *self, PyObject *args) "substring not found"); return NULL; } - return PyInt_FromSsize_t(result); + return PyLong_FromSsize_t(result); } @@ -1808,7 +1808,7 @@ string_count(PyStringObject *self, PyObject *args) string_adjust_indices(&start, &end, PyString_GET_SIZE(self)); - return PyInt_FromSsize_t( + return PyLong_FromSsize_t( stringlib_count(str + start, end - start, sub, sub_len) ); } @@ -3332,7 +3332,7 @@ striter_next(striterobject *it) assert(PyString_Check(seq)); if (it->it_index < PyString_GET_SIZE(seq)) { - item = PyInt_FromLong( + item = PyLong_FromLong( (unsigned char)seq->ob_sval[it->it_index]); if (item != NULL) ++it->it_index; @@ -3350,7 +3350,7 @@ striter_len(striterobject *it) Py_ssize_t len = 0; if (it->it_seq) len = PyString_GET_SIZE(it->it_seq) - it->it_index; - return PyInt_FromSsize_t(len); + return PyLong_FromSsize_t(len); } PyDoc_STRVAR(length_hint_doc, |