From fde54fefa435cf4f84d6731dabb7a03d61cf771c Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 25 Jan 2009 19:35:28 +0100 Subject: [PATCH] fix 'cdef str' typing in Py3 (becomes bytes type) --- Cython/Compiler/ModuleNode.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 683606dc..ec5c473c 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -475,6 +475,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 PyString_CheckExact PyBytes_CheckExact") 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