projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69fb3b5
)
fix return value setting for 'except *' functions
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 6 Jun 2008 15:11:57 +0000
(17:11 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 6 Jun 2008 15:11:57 +0000
(17:11 +0200)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index 58831036d7e107e4dd7cfba5c64d017f79670e3a..0e5af11a88f509129523119ea7c2696883c189e8 100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-956,6
+956,8
@@
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;" % (