[Python-checkins] r42400 - python/trunk/Objects/bufferobject.c python/trunk/Objects/dictobject.c python/trunk/Objects/funcobject.c python/trunk/Objects/listobject.c python/trunk/Objects/structseq.c
neal.norwitz
python-checkins at python.org
Thu Feb 16 07:21:58 CET 2006
Author: neal.norwitz
Date: Thu Feb 16 07:21:57 2006
New Revision: 42400
Modified:
python/trunk/Objects/bufferobject.c
python/trunk/Objects/dictobject.c
python/trunk/Objects/funcobject.c
python/trunk/Objects/listobject.c
python/trunk/Objects/structseq.c
Log:
Get rid of compiler warnings (gcc 3.3.4 on x86)
Modified: python/trunk/Objects/bufferobject.c
==============================================================================
--- python/trunk/Objects/bufferobject.c (original)
+++ python/trunk/Objects/bufferobject.c Thu Feb 16 07:21:57 2006
@@ -246,15 +246,15 @@
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);
}
Modified: python/trunk/Objects/dictobject.c
==============================================================================
--- python/trunk/Objects/dictobject.c (original)
+++ python/trunk/Objects/dictobject.c Thu Feb 16 07:21:57 2006
@@ -1149,7 +1149,7 @@
PyErr_Format(PyExc_ValueError,
"dictionary update sequence element #%d "
"has length %ld; 2 is required",
- i, n);
+ i, (long)n);
goto Fail;
}
Modified: python/trunk/Objects/funcobject.c
==============================================================================
--- python/trunk/Objects/funcobject.c (original)
+++ python/trunk/Objects/funcobject.c Thu Feb 16 07:21:57 2006
@@ -251,7 +251,7 @@
"%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 @@
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++) {
Modified: python/trunk/Objects/listobject.c
==============================================================================
--- python/trunk/Objects/listobject.c (original)
+++ python/trunk/Objects/listobject.c Thu Feb 16 07:21:57 2006
@@ -2601,8 +2601,8 @@
/* 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;
}
Modified: python/trunk/Objects/structseq.c
==============================================================================
--- python/trunk/Objects/structseq.c (original)
+++ python/trunk/Objects/structseq.c Thu Feb 16 07:21:57 2006
@@ -126,7 +126,7 @@
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 @@
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 @@
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;
}
More information about the Python-checkins
mailing list