summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ModuleNode.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2015-09-17 22:01:49 +0200
committerStefan Behnel <stefan_ml@behnel.de>2015-09-17 22:01:49 +0200
commit8829d7b10507a621216ba7fa6d24abc69193a491 (patch)
tree91276be012fcb2469037e4f4988d3333aa6275fe /Cython/Compiler/ModuleNode.py
parent7fad62706460a9445e6669bde172bc96ca284d26 (diff)
downloadcython-8829d7b10507a621216ba7fa6d24abc69193a491.tar.gz
streamline exception type tests
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r--Cython/Compiler/ModuleNode.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index 257c920d5..5180d9714 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -1725,8 +1725,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln(
"PyObject *v = PyObject_GenericGetAttr(o, n);")
if getattr_entry is not None:
+ code.globalstate.use_utility_code(UtilityCode.load_cached("PyErrExceptionMatches", "Exceptions.c"))
code.putln(
- "if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {")
+ "if (!v && __Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)) {")
code.putln(
"PyErr_Clear();")
code.putln(