[pypy-commit] cffi default: Fix the XXX.
arigo
noreply at buildbot.pypy.org
Sat Jun 23 09:59:35 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r486:d8f1d1089394
Date: 2012-06-22 22:59 +0200
http://bitbucket.org/cffi/cffi/changeset/d8f1d1089394/
Log: Fix the XXX.
diff --git a/c/_ffi_backend.c b/c/_ffi_backend.c
--- a/c/_ffi_backend.c
+++ b/c/_ffi_backend.c
@@ -2363,11 +2363,7 @@
PyErr_SetString(PyExc_ValueError, "negative array length");
return NULL;
}
-#ifdef MS_WIN32
- sprintf(extra_text, "[%ld]", (long)length); /* XXX not large enough */
-#else
- sprintf(extra_text, "[%zd]", length);
-#endif
+ sprintf(extra_text, "[%llu]", (unsigned PY_LONG_LONG)length);
arraysize = length * ctitem->ct_size;
if (length > 0 && (arraysize / length) != ctitem->ct_size) {
PyErr_SetString(PyExc_OverflowError,
More information about the pypy-commit
mailing list