Author: Armin Rigo <ar...@tunes.org> Branch: cffi-1.0 Changeset: r1981:9ea7c5347d6b Date: 2015-05-12 10:24 +0200 http://bitbucket.org/cffi/cffi/changeset/9ea7c5347d6b/
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 @@ -467,6 +467,9 @@ CTypeDescrObject *ct; size_t replace_with_len; static char *keywords[] = {"cdecl", "replace_with", NULL}; +#if PY_MAJOR_VERSION >= 3 + PyObject *u; +#endif if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|s:getctype", keywords, &c_decl, &replace_with)) @@ -502,9 +505,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 pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit