From 6902bf813ea0952374535a1790ed24cc5fdb06b6 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 12 Oct 2013 16:17:29 +0200 Subject: [PATCH] fix warnings in refnanny module --- Cython/Runtime/refnanny.pyx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Cython/Runtime/refnanny.pyx b/Cython/Runtime/refnanny.pyx index 136e69b..1f7e85f 100644 --- a/Cython/Runtime/refnanny.pyx +++ b/Cython/Runtime/refnanny.pyx @@ -86,8 +86,7 @@ cdef PyObject* SetupContext(char* funcname, int lineno, char* filename) except N # In that case, we don't want to be doing anything fancy # like caching and resetting exceptions. return NULL - cdef PyObject* type = NULL, *value = NULL, *tb = NULL - cdef PyObject* result = NULL + cdef (PyObject*) type = NULL, value = NULL, tb = NULL, result = NULL PyThreadState_Get() PyErr_Fetch(&type, &value, &tb) try: @@ -101,7 +100,7 @@ cdef PyObject* SetupContext(char* funcname, int lineno, char* filename) except N cdef void GOTREF(PyObject* ctx, PyObject* p_obj, int lineno): if ctx == NULL: return - cdef PyObject* type = NULL, *value = NULL, *tb = NULL + cdef (PyObject*) type = NULL, value = NULL, tb = NULL PyErr_Fetch(&type, &value, &tb) try: try: @@ -118,7 +117,7 @@ cdef void GOTREF(PyObject* ctx, PyObject* p_obj, int lineno): cdef int GIVEREF_and_report(PyObject* ctx, PyObject* p_obj, int lineno): if ctx == NULL: return 1 - cdef PyObject* type = NULL, *value = NULL, *tb = NULL + cdef (PyObject*) type = NULL, value = NULL, tb = NULL cdef bint decref_ok = False PyErr_Fetch(&type, &value, &tb) try: @@ -150,7 +149,7 @@ cdef void DECREF(PyObject* ctx, PyObject* obj, int lineno): cdef void FinishContext(PyObject** ctx): if ctx == NULL or ctx[0] == NULL: return - cdef PyObject* type = NULL, *value = NULL, *tb = NULL + cdef (PyObject*) type = NULL, value = NULL, tb = NULL cdef object errors = None cdef Context context PyThreadState_Get() -- 2.7.4