Author: Armin Rigo <[email protected]>
Branch: cffi-1.0.0b3
Changeset: r2000:3c32315604f5
Date: 2015-05-12 10:24 +0200
http://bitbucket.org/cffi/cffi/changeset/3c32315604f5/
Log: Fix for 3.4.1 (this version forces -Werror=declaration-after-
statement)
diff --git a/_cffi1/ffi_obj.c b/_cffi1/ffi_obj.c
--- a/_cffi1/ffi_obj.c
+++ b/_cffi1/ffi_obj.c
@@ -448,6 +448,9 @@
int add_paren, add_space;
CTypeDescrObject *ct;
size_t replace_with_len;
+#if PY_MAJOR_VERSION >= 3
+ PyObject *u;
+#endif
if (!PyArg_ParseTuple(args, "O|s:getctype", &c_decl, &replace_with))
return NULL;
@@ -482,9 +485,9 @@
#if PY_MAJOR_VERSION >= 3
/* bytes -> unicode string */
- PyObject *u = PyUnicode_DecodeLatin1(PyBytes_AS_STRING(res),
- PyBytes_GET_SIZE(res),
- NULL);
+ u = PyUnicode_DecodeLatin1(PyBytes_AS_STRING(res),
+ PyBytes_GET_SIZE(res),
+ NULL);
Py_DECREF(res);
res = u;
#endif
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit