diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-16 14:32:27 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-16 14:32:27 +0000 |
commit | 4b3354f93da362a0fe7ea56b91018abdb5ad4f57 (patch) | |
tree | b42c185ec435c28306a14382c1c18fccd0d6caca /Objects/stringobject.c | |
parent | 452728f8dbedda975adb3d72e36fbc0e09b3f686 (diff) | |
download | cpython-4b3354f93da362a0fe7ea56b91018abdb5ad4f57.tar.gz |
Use Py_ssize_t for counts and sizes.
Convert Py_ssize_t using PyInt_FromSsize_t
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 8821dcecfd..733d3422e6 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -1030,7 +1030,7 @@ string_contains(PyObject *a, PyObject *el) const char *sub = PyString_AS_STRING(el); char *last; Py_ssize_t len_sub = PyString_GET_SIZE(el); - int shortsub; + Py_ssize_t shortsub; char firstchar, lastchar; if (!PyString_CheckExact(el)) { @@ -2942,11 +2942,11 @@ PyDoc_STRVAR(zfill__doc__, static PyObject * string_zfill(PyStringObject *self, PyObject *args) { - long fill; + Py_ssize_t fill; PyObject *s; char *p; - int width; + long width; if (!PyArg_ParseTuple(args, "l:zfill", &width)) return NULL; @@ -3886,7 +3886,7 @@ PyObject * PyString_Format(PyObject *format, PyObject *args) { char *fmt, *res; - int arglen, argidx; + Py_ssize_t arglen, argidx; Py_ssize_t reslen, rescnt, fmtcnt; int args_owned = 0; PyObject *result, *orig_args; @@ -4294,7 +4294,7 @@ PyString_Format(PyObject *format, PyObject *args) /* Fiddle args right (remove the first argidx arguments) */ if (PyTuple_Check(orig_args) && argidx > 0) { PyObject *v; - int n = PyTuple_GET_SIZE(orig_args) - argidx; + Py_ssize_t n = PyTuple_GET_SIZE(orig_args) - argidx; v = PyTuple_New(n); if (v == NULL) goto error; |