code cleanup
authorStefan Behnel <scoder@users.berlios.de>
Sun, 14 Mar 2010 15:28:27 +0000 (16:28 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 14 Mar 2010 15:28:27 +0000 (16:28 +0100)
Cython/Compiler/ModuleNode.py

index c0010d77679512a1427ee6aa63d13c3e89442931..072e7153486e7c3587ed12abbbafb0213d48eaa8 100644 (file)
@@ -1652,11 +1652,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
         self.generate_filename_init_call(code)
 
         code.putln("%s = PyTuple_New(0); %s" % (Naming.empty_tuple, code.error_goto_if_null(Naming.empty_tuple, self.pos)));
-        code.putln("#if PY_MAJOR_VERSION < 3");
-        code.putln("%s = PyString_FromStringAndSize(\"\", 0); %s" % (Naming.empty_bytes, code.error_goto_if_null(Naming.empty_bytes, self.pos)));
-        code.putln("#else");
-        code.putln("%s = PyBytes_FromStringAndSize(\"\", 0); %s" % (Naming.empty_bytes, code.error_goto_if_null(Naming.empty_bytes, self.pos)));
-        code.putln("#endif");
+        code.putln("%s = __Pyx_PyBytes_FromStringAndSize(\"\", 0); %s" % (Naming.empty_bytes, code.error_goto_if_null(Naming.empty_bytes, self.pos)));
 
         code.putln("/*--- Library function declarations ---*/")
         env.generate_library_function_declarations(code)