From: Robert Bradshaw Date: Fri, 18 Jul 2008 08:11:51 +0000 (-0700) Subject: Fix bugs for rhs -> default and exception handling. X-Git-Tag: 0.9.8.1~122^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5bc442c615030c525356386488c354b56c7d0bcc;p=cython.git Fix bugs for rhs -> default and exception handling. --- diff --git a/Cython/CodeWriter.py b/Cython/CodeWriter.py index 2d192856..7d995b08 100644 --- a/Cython/CodeWriter.py +++ b/Cython/CodeWriter.py @@ -70,9 +70,9 @@ class CodeWriter(TreeVisitor): if len(items) > 0: for item in items[:-1]: self.visit(item) - if output_rhs and item.rhs is not None: + if output_rhs and item.default is not None: self.put(u" = ") - self.visit(item.rhs) + self.visit(item.default) self.put(u", ") self.visit(items[-1]) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 3ace94e7..0644b9fc 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -1670,7 +1670,7 @@ class SimpleCallNode(CallNode): return func_type def exception_checks(self): - func_type = self.function.type + func_type = self.function_type() exc_val = func_type.exception_value exc_check = func_type.exception_check if exc_val is None and self.function.entry.visibility != 'extern': diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 711c6880..d237e5c6 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -358,6 +358,8 @@ class CNameDeclaratorNode(CDeclaratorNode): child_attrs = ['default'] + default = None + def analyse(self, base_type, env, nonempty = 0): if nonempty and self.name == '': # Must have mistaken the name for the type.