From: Stefan Behnel Date: Fri, 6 Jun 2008 16:22:23 +0000 (+0200) Subject: code cleanup after last change X-Git-Tag: 0.9.8rc1~11^2~10^2~6^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8755e2ff61194d588dcadc9aa8f247b4c49305d6;p=cython.git code cleanup after last change --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 0e5af11a..1e5479fd 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -956,26 +956,19 @@ class FuncDefNode(StatNode, BlockNode): exc_check = self.caller_will_check_exceptions() if err_val is not None or exc_check: code.putln('__Pyx_AddTraceback("%s");' % self.entry.qualified_name) - if err_val is None and self.return_type.default_value: - err_val = self.return_type.default_value - if err_val is not None: - code.putln( - "%s = %s;" % ( - Naming.retval_cname, - err_val)) else: code.putln( '__Pyx_WriteUnraisable("%s");' % self.entry.qualified_name) env.use_utility_code(unraisable_exception_utility_code) - #if not self.return_type.is_void: - default_retval = self.return_type.default_value - if default_retval: - code.putln( - "%s = %s;" % ( - Naming.retval_cname, - default_retval)) - #self.return_type.default_value)) + default_retval = self.return_type.default_value + if err_val is None and default_retval: + err_val = default_retval + if err_val is not None: + code.putln( + "%s = %s;" % ( + Naming.retval_cname, + err_val)) # ----- Return cleanup code.put_label(code.return_label) if not Options.init_local_none: