Allow predeclared __Pyx_CppExn2PyErr.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 26 Apr 2008 15:45:09 +0000 (08:45 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 26 Apr 2008 15:45:09 +0000 (08:45 -0700)
Cython/Compiler/ExprNodes.py

index 8fb247230464844dd3c513b3af9bb03643e39528..209b4d95a10115cb01055ba385237d5f89e7b945 100644 (file)
@@ -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
+""",""]
 
 #------------------------------------------------------------------------------------