From 61e95f53cd2d0ad1d0dec6e8f654a8303847ddc9 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 12 Oct 2009 09:03:21 +0200 Subject: [PATCH] fix PyString_CheckExact definition in Py3, minor cleanup --- Cython/Compiler/ModuleNode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index ed06bb18..c7ad7bc1 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -454,7 +454,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln(" #define PyVarObject_HEAD_INIT(type, size) \\") code.putln(" PyObject_HEAD_INIT(type) size,") code.putln(" #define PyType_Modified(t)") - code.putln(" #define PyBytes_CheckExact(b) PyString_CheckExact(b)") + code.putln(" #define PyBytes_CheckExact PyString_CheckExact") code.putln("") code.putln(" typedef struct {") code.putln(" void *buf;") @@ -496,7 +496,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 PyUnicode_Type") - code.putln(" #define PyString_CheckExact PyBytes_CheckExact") + code.putln(" #define PyString_CheckExact PyUnicode_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