From a34888eded66c680c565843877180bc1428041b1 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 30 May 2008 08:32:41 +0200 Subject: [PATCH] '#define PyString_Type PyBytes_Type' in Py3: 'str' is considered a builtin and internally mapped to PyString_Type, which must also work in Py3 --- Cython/Compiler/ModuleNode.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 74536dab..418af3ce 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -425,6 +425,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln("#if PY_MAJOR_VERSION >= 3") code.putln(" #define PyBaseString_Type PyUnicode_Type") + code.putln(" #define PyString_Type PyBytes_Type") code.putln(" #define PyInt_Type PyLong_Type") code.putln(" #define PyInt_Check(op) PyLong_Check(op)") code.putln(" #define PyInt_CheckExact(op) PyLong_CheckExact(op)") -- 2.26.2