fix string constant declarations for non CPython-version-specific strings
authorStefan Behnel <scoder@users.berlios.de>
Thu, 21 Apr 2011 22:37:46 +0000 (00:37 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 21 Apr 2011 22:37:46 +0000 (00:37 +0200)
Cython/Compiler/Code.py

index 0935c6c3cec089cc744c46611ed6f0519a08a81a..c4c766cb367c1bc83cb13b00f4ff8b31aee1c864 100644 (file)
@@ -334,7 +334,9 @@ class StringConst(object):
         self.py_versions = []
 
     def add_py_version(self, version):
-        if version and version not in self.py_versions:
+        if not version:
+            self.py_versions = [2,3]
+        elif version not in self.py_versions:
             self.py_versions.append(version)
 
     def get_py_string_const(self, encoding, identifier=None,