From: Stefan Behnel Date: Sun, 14 Mar 2010 15:28:27 +0000 (+0100) Subject: code cleanup X-Git-Tag: 0.13.beta0~285 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5724798eae9aabeee42f7e36871f0a67b3f7ffb8;p=cython.git code cleanup --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index c0010d77..072e7153 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -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)