fix long literals in Py3
authorStefan Behnel <scoder@users.berlios.de>
Sat, 21 Feb 2009 17:07:01 +0000 (18:07 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 21 Feb 2009 17:07:01 +0000 (18:07 +0100)
Cython/Compiler/Code.py

index 55742e601dcaca8571630706e3335c3d6e8a1dd6..99c0203fb8e251e4fe0a5132658b5cb738c3962f 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,
+                    entry.init[:-1],
                     self.initwriter.error_goto_if_null(entry.cname, self.module_pos)))
             else:
                 self.initwriter.putln("%s = PyInt_FromLong(%s); %s;" % (