From 461323b6f367de4a7131aaeeff4cd20de1daa81e Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Tue, 3 Feb 2009 12:28:31 -0200 Subject: [PATCH] refnanny extension module does not need to export functions as public --- Cython/Runtime/refnanny.pyx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Cython/Runtime/refnanny.pyx b/Cython/Runtime/refnanny.pyx index 719cb37e..4b459e78 100644 --- a/Cython/Runtime/refnanny.pyx +++ b/Cython/Runtime/refnanny.pyx @@ -62,7 +62,7 @@ cdef void* Refnanny_NewContext(char* funcname, int lineno) except NULL: Py_INCREF(ctx) return ctx -cdef public void Refnanny_GOTREF(void* ctx, void* p_obj, int lineno): +cdef void Refnanny_GOTREF(void* ctx, void* p_obj, int lineno): cdef exc.PyObject* type = NULL, *value = NULL, *tb = NULL if ctx == NULL: return exc.PyErr_Fetch(&type, &value, &tb) @@ -78,7 +78,7 @@ cdef public void Refnanny_GOTREF(void* ctx, void* p_obj, int lineno): Py_XDECREF(tb) raise -cdef public void Refnanny_GIVEREF(void* ctx, void* p_obj, int lineno): +cdef void Refnanny_GIVEREF(void* ctx, void* p_obj, int lineno): cdef exc.PyObject* type = NULL, *value = NULL, *tb = NULL if ctx == NULL: return exc.PyErr_Fetch(&type, &value, &tb) @@ -94,17 +94,16 @@ cdef public void Refnanny_GIVEREF(void* ctx, void* p_obj, int lineno): Py_XDECREF(tb) raise -cdef public void Refnanny_INCREF(void* ctx, void* obj, int lineno): +cdef void Refnanny_INCREF(void* ctx, void* obj, int lineno): if obj is not NULL: Py_INCREF(obj) Refnanny_GOTREF(ctx, obj, lineno) - -cdef public void Refnanny_DECREF(void* ctx, void* obj, int lineno): + +cdef void Refnanny_DECREF(void* ctx, void* obj, int lineno): # GIVEREF raises exception if we hit 0 - # Refnanny_GIVEREF(ctx, obj, lineno) if obj is not NULL: Py_DECREF(obj) - -cdef public int Refnanny_FinishContext(void* ctx) except -1: + +cdef int Refnanny_FinishContext(void* ctx) except -1: cdef exc.PyObject* type = NULL, *value = NULL, *tb = NULL if ctx == NULL: assert False @@ -122,7 +121,7 @@ cdef public int Refnanny_FinishContext(void* ctx) except -1: Py_XDECREF(obj) return 0 - + cdef extern from "Python.h": -- 2.26.2