From 911ca8a1141d7805d6d1e0097cf38eb94319815e Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 26 Apr 2008 08:45:09 -0700 Subject: [PATCH] Allow predeclared __Pyx_CppExn2PyErr. --- Cython/Compiler/ExprNodes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 8fb24723..209b4d95 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -4102,9 +4102,8 @@ bad: cpp_exception_utility_code = [ """ -static int __Pyx_CppExn2PyErr(); /*proto*/ -""",""" -void __Pyx_CppExn2PyErr() { +#ifndef __Pyx_CppExn2PyErr +static void __Pyx_CppExn2PyErr() { try { if (PyErr_Occurred()) ; // let the latest Python exn pass through and ignore the current one @@ -4121,6 +4120,7 @@ void __Pyx_CppExn2PyErr() { PyErr_SetString(PyExc_RuntimeError, "Unknown exception"); } } -"""] +#endif +""",""] #------------------------------------------------------------------------------------ -- 2.26.2