diff options
| author | Armin Rigo <arigo@tunes.org> | 2015-05-12 10:24:07 +0200 |
|---|---|---|
| committer | Armin Rigo <arigo@tunes.org> | 2015-05-12 10:24:07 +0200 |
| commit | b530551a3f122b18cd00a56bc4fe7bd4911f61d1 (patch) | |
| tree | b91fd5678850e4201defa27dfc9b83c1ccbd18af | |
| parent | 33e0e519c54385f2503235af673e8dcaa7a40f02 (diff) | |
| download | cffi-1.0.0b3.tar.gz | |
Fix for 3.4.1 (this version forces -Werror=declaration-after-statement)cffi-1.0.0b3
| -rw-r--r-- | _cffi1/ffi_obj.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/_cffi1/ffi_obj.c b/_cffi1/ffi_obj.c index ac7e05a..9aa8321 100644 --- a/_cffi1/ffi_obj.c +++ b/_cffi1/ffi_obj.c @@ -448,6 +448,9 @@ static PyObject *ffi_getctype(FFIObject *self, PyObject *args) 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 @@ static PyObject *ffi_getctype(FFIObject *self, PyObject *args) #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 |
