summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-02-15 17:27:45 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-02-15 17:27:45 (GMT)
commit18e165558b24d29e7e0ca501842b9236589b012a (patch)
tree841678b5dc1aff3aa48701fee33a6ba7be00a72b /Python/bltinmodule.c
parent44829297348d9121a03fc7df2fac557b583cc7fa (diff)
downloadcpython-18e165558b24d29e7e0ca501842b9236589b012a.zip
cpython-18e165558b24d29e7e0ca501842b9236589b012a.tar.gz
cpython-18e165558b24d29e7e0ca501842b9236589b012a.tar.bz2
Merge ssize_t branch.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 362294f..4f607d6 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -405,7 +405,7 @@ builtin_compile(PyObject *self, PyObject *args)
int supplied_flags = 0;
PyCompilerFlags cf;
PyObject *result = NULL, *cmd, *tmp = NULL;
- int length;
+ Py_ssize_t length;
if (!PyArg_ParseTuple(args, "Oss|ii:compile", &cmd, &filename,
&startstr, &supplied_flags, &dont_inherit))
@@ -824,7 +824,7 @@ builtin_map(PyObject *self, PyObject *args)
PyObject *func, *result;
sequence *seqs = NULL, *sqp;
- int n, len;
+ Py_ssize_t n, len;
register int i, j;
n = PyTuple_Size(args);
@@ -1163,12 +1163,12 @@ In the second form, the callable is called until it returns the sentinel.");
static PyObject *
builtin_len(PyObject *self, PyObject *v)
{
- long res;
+ Py_ssize_t res;
res = PyObject_Size(v);
if (res < 0 && PyErr_Occurred())
return NULL;
- return PyInt_FromLong(res);
+ return PyInt_FromSsize_t(res);
}
PyDoc_STRVAR(len_doc,
@@ -2346,8 +2346,8 @@ static PyObject *
filtertuple(PyObject *func, PyObject *tuple)
{
PyObject *result;
- register int i, j;
- int len = PyTuple_Size(tuple);
+ Py_ssize_t i, j;
+ Py_ssize_t len = PyTuple_Size(tuple);
if (len == 0) {
if (PyTuple_CheckExact(tuple))
@@ -2417,9 +2417,9 @@ static PyObject *
filterstring(PyObject *func, PyObject *strobj)
{
PyObject *result;
- register int i, j;
- int len = PyString_Size(strobj);
- int outlen = len;
+ Py_ssize_t i, j;
+ Py_ssize_t len = PyString_Size(strobj);
+ Py_ssize_t outlen = len;
if (func == Py_None) {
/* If it's a real string we can return the original,