summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-02-16 06:21:57 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-02-16 06:21:57 (GMT)
commit26efe402c2a5dba441dc2feae2f15fea6be452ba (patch)
tree7d083ee4baf14cd990a8dbcfefa9aa7ba9ca5285 /Objects
parent15231548d20b2a6fcac2830935ec076bed42448f (diff)
downloadcpython-26efe402c2a5dba441dc2feae2f15fea6be452ba.zip
cpython-26efe402c2a5dba441dc2feae2f15fea6be452ba.tar.gz
cpython-26efe402c2a5dba441dc2feae2f15fea6be452ba.tar.bz2
Get rid of compiler warnings (gcc 3.3.4 on x86)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bufferobject.c6
-rw-r--r--Objects/dictobject.c2
-rw-r--r--Objects/funcobject.c4
-rw-r--r--Objects/listobject.c4
-rw-r--r--Objects/structseq.c6
5 files changed, 11 insertions, 11 deletions
diff --git a/Objects/bufferobject.c b/Objects/bufferobject.c
index 4a9e3ae..a21d0b1 100644
--- a/Objects/bufferobject.c
+++ b/Objects/bufferobject.c
@@ -246,15 +246,15 @@ buffer_repr(PyBufferObject *self)
return PyString_FromFormat("<%s buffer ptr %p, size %ld at %p>",
status,
self->b_ptr,
- self->b_size,
+ (long)self->b_size,
self);
else
return PyString_FromFormat(
"<%s buffer for %p, size %ld, offset %ld at %p>",
status,
self->b_base,
- self->b_size,
- self->b_offset,
+ (long)self->b_size,
+ (long)self->b_offset,
self);
}
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index bacb705..abc9c8c 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1149,7 +1149,7 @@ PyDict_MergeFromSeq2(PyObject *d, PyObject *seq2, int override)
PyErr_Format(PyExc_ValueError,
"dictionary update sequence element #%d "
"has length %ld; 2 is required",
- i, n);
+ i, (long)n);
goto Fail;
}
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index 4abf51a..d644001 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -251,7 +251,7 @@ func_set_code(PyFunctionObject *op, PyObject *value)
"%s() requires a code object with %ld free vars,"
" not %ld",
PyString_AsString(op->func_name),
- nclosure, nfree);
+ (long)nclosure, (long)nfree);
return -1;
}
tmp = op->func_code;
@@ -403,7 +403,7 @@ func_new(PyTypeObject* type, PyObject* args, PyObject* kw)
return PyErr_Format(PyExc_ValueError,
"%s requires closure of length %ld, not %ld",
PyString_AS_STRING(code->co_name),
- nfree, nclosure);
+ (long)nfree, (long)nclosure);
if (nclosure) {
Py_ssize_t i;
for (i = 0; i < nclosure; i++) {
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 41f7390..460f63a 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -2601,8 +2601,8 @@ list_ass_subscript(PyListObject* self, PyObject* item, PyObject* value)
/* XXX can we use %zd here? */
PyErr_Format(PyExc_ValueError,
"attempt to assign sequence of size %ld to extended slice of size %ld",
- PySequence_Fast_GET_SIZE(seq),
- slicelength);
+ (long)PySequence_Fast_GET_SIZE(seq),
+ (long)slicelength);
Py_DECREF(seq);
return -1;
}
diff --git a/Objects/structseq.c b/Objects/structseq.c
index b035ca2..a95f3a9 100644
--- a/Objects/structseq.c
+++ b/Objects/structseq.c
@@ -126,7 +126,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (len < min_len) {
PyErr_Format(PyExc_TypeError,
"%.500s() takes an at least %ld-sequence (%ld-sequence given)",
- type->tp_name, min_len, len);
+ type->tp_name, (long)min_len, (long)len);
Py_DECREF(arg);
return NULL;
}
@@ -134,7 +134,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (len > max_len) {
PyErr_Format(PyExc_TypeError,
"%.500s() takes an at most %ld-sequence (%ld-sequence given)",
- type->tp_name, max_len, len);
+ type->tp_name, (long)max_len, (long)len);
Py_DECREF(arg);
return NULL;
}
@@ -143,7 +143,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (len != min_len) {
PyErr_Format(PyExc_TypeError,
"%.500s() takes a %ld-sequence (%ld-sequence given)",
- type->tp_name, min_len, len);
+ type->tp_name, (long)min_len, (long)len);
Py_DECREF(arg);
return NULL;
}