From: Robert Bradshaw Date: Tue, 21 Oct 2008 23:43:31 +0000 (-0700) Subject: utility functions must be static X-Git-Tag: 0.9.9.2.beta~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3779be3d435388fcf216af19cd4b1827188d7b72;p=cython.git utility functions must be static otherwise one has multiple symbol definition errors in linking two or more modules --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 4a1ea98f..691e1ccf 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -5000,10 +5000,10 @@ bad: restore_exception_utility_code = [ """ -void INLINE __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -void INLINE __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static void INLINE __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static void INLINE __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ """,""" -void INLINE __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +static void INLINE __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); @@ -5018,7 +5018,7 @@ void INLINE __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { Py_XDECREF(tmp_tb); } -void INLINE __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +static void INLINE __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; @@ -5158,10 +5158,10 @@ bad: reset_exception_utility_code = [ """ -void INLINE __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static void INLINE __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ """,""" -void INLINE __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { +static void INLINE __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { PyThreadState *tstate = PyThreadState_GET(); *type = tstate->exc_type; *value = tstate->exc_value; @@ -5171,7 +5171,7 @@ void INLINE __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb Py_XINCREF(*tb); } -void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type;