From 3779be3d435388fcf216af19cd4b1827188d7b72 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Tue, 21 Oct 2008 16:43:31 -0700 Subject: [PATCH] utility functions must be static otherwise one has multiple symbol definition errors in linking two or more modules --- Cython/Compiler/Nodes.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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; -- 2.26.2