projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c0ea3b
)
Annotation fix when no else clause.
author
HoytKoepke
<none@none>
Sat, 16 Aug 2008 20:26:48 +0000
(13:26 -0700)
committer
HoytKoepke
<none@none>
Sat, 16 Aug 2008 20:26:48 +0000
(13:26 -0700)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index a67dffa556f474c4a025730eef63999b00aa3232..7eb3ede8faf80dd77b0e570410a6bf7ca139057b 100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-3041,7
+3041,7
@@
class SwitchCaseNode(StatNode):
def annotate(self, code):
for cond in self.conditions:
cond.annotate(code)
- body.annotate(code)
+
self.
body.annotate(code)
class SwitchStatNode(StatNode):
# Generated in the optimization of an if-elif-else node
@@
-3065,7
+3065,8
@@
class SwitchStatNode(StatNode):
self.test.annotate(code)
for case in self.cases:
case.annotate(code)
- self.else_clause.annotate(code)
+ if self.else_clause is not None:
+ self.else_clause.annotate(code)
class LoopNode: