projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f1dbe2
)
Eric Huss's readonly variable patch:
author
William Stein
<wstein@gmail.com>
Thu, 30 Nov 2006 19:57:57 +0000
(11:57 -0800)
committer
William Stein
<wstein@gmail.com>
Thu, 30 Nov 2006 19:57:57 +0000
(11:57 -0800)
There's a minor bug, if you try to cdef a readonly variable at the module
scope, the compiler raises an UnboundLocalError exception. The attached
patch seems to clear up the problem and gets the compiler to report the
correct error.
Cython/Compiler/Code.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Code.py
b/Cython/Compiler/Code.py
index 062efb6a0f420c6e359598a27801a06c78a7d44a..08f186cc8b22d320866c1390c7801a58a4299069 100644
(file)
--- a/
Cython/Compiler/Code.py
+++ b/
Cython/Compiler/Code.py
@@
-183,6
+183,8
@@
class CCodeWriter:
storage_class = "static"
else:
storage_class = ""
+ else:
+ storage_class = ""
if storage_class:
self.put("%s " % storage_class)
#if visibility == 'extern' or visibility == 'public' and not definition: