From: Stefan Behnel Date: Fri, 30 May 2008 06:32:41 +0000 (+0200) Subject: '#define PyString_Type PyBytes_Type' in Py3: 'str' is considered a builtin and intern... X-Git-Tag: 0.9.8rc1~11^2~10^2~10^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a34888eded66c680c565843877180bc1428041b1;p=cython.git '#define PyString_Type PyBytes_Type' in Py3: 'str' is considered a builtin and internally mapped to PyString_Type, which must also work in Py3 --- 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)")