From: Stefan Behnel Date: Thu, 21 Apr 2011 22:37:46 +0000 (+0200) Subject: fix string constant declarations for non CPython-version-specific strings X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6485cee01454de7e49f497b087ed96f1f32dc5c9;p=cython.git fix string constant declarations for non CPython-version-specific strings --- diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py index 0935c6c3..c4c766cb 100644 --- a/Cython/Compiler/Code.py +++ b/Cython/Compiler/Code.py @@ -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,