Fix bug with infered const temp vars.
authorRobert Bradshaw <robertwb@gmail.com>
Tue, 26 Mar 2013 06:30:34 +0000 (23:30 -0700)
committerRobert Bradshaw <robertwb@gmail.com>
Tue, 26 Mar 2013 06:30:34 +0000 (23:30 -0700)
Cython/Compiler/Code.py

index 2b0773d..94b1246 100644 (file)
@@ -580,6 +580,8 @@ class FunctionState(object):
 
         A C string referring to the variable is returned.
         """
+        if type.is_const:
+            type = type.const_base_type
         if not type.is_pyobject and not type.is_memoryviewslice:
             # Make manage_ref canonical, so that manage_ref will always mean
             # a decref is needed.