comment
authorStefan Behnel <scoder@users.berlios.de>
Sat, 21 Feb 2009 18:22:37 +0000 (19:22 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 21 Feb 2009 18:22:37 +0000 (19:22 +0100)
Cython/Compiler/Code.py

index 99c0203fb8e251e4fe0a5132658b5cb738c3962f..f30110e87c94f784f6069d8805aa891821081079 100644 (file)
@@ -354,7 +354,7 @@ class GlobalState(object):
             if entry.init[-1] == "L":
                 self.initwriter.putln('%s = PyLong_FromString((char *)"%s", 0, 0); %s;' % (
                     entry.cname,
-                    entry.init[:-1],
+                    entry.init[:-1], # strip 'L' for Py3 compatibility
                     self.initwriter.error_goto_if_null(entry.cname, self.module_pos)))
             else:
                 self.initwriter.putln("%s = PyInt_FromLong(%s); %s;" % (