[pypy-commit] cffi cpy-extension: On 64-bit don't declare twice the same function.
arigo
noreply at buildbot.pypy.org
Tue Jun 12 18:24:32 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: cpy-extension
Changeset: r300:3ae40e3d79df
Date: 2012-06-12 18:24 +0200
http://bitbucket.org/cffi/cffi/changeset/3ae40e3d79df/
Log: On 64-bit don't declare twice the same function.
diff --git a/c/_ffi_backend.c b/c/_ffi_backend.c
--- a/c/_ffi_backend.c
+++ b/c/_ffi_backend.c
@@ -3289,6 +3289,7 @@
_cffi_to_c_PRIMITIVE(unsigned_int, unsigned int)
#endif
+#if SIZEOF_LONG < SIZEOF_LONG_LONG
static unsigned long _cffi_to_c_unsigned_long(PyObject *obj)
{
unsigned PY_LONG_LONG value = _my_PyLong_AsUnsignedLongLong(obj, 1);
@@ -3296,6 +3297,9 @@
return (unsigned long)_convert_overflow(obj, "unsigned long");
return (unsigned long)value;
}
+#else
+# define _cffi_to_c_unsigned_long _cffi_to_c_unsigned_long_long
+#endif
static unsigned PY_LONG_LONG _cffi_to_c_unsigned_long_long(PyObject *obj)
{
More information about the pypy-commit
mailing list