From: Stefan Behnel Date: Mon, 12 Oct 2009 07:03:21 +0000 (+0200) Subject: fix PyString_CheckExact definition in Py3, minor cleanup X-Git-Tag: 0.13.beta0~2^2~121^2~72 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=61e95f53cd2d0ad1d0dec6e8f654a8303847ddc9;p=cython.git fix PyString_CheckExact definition in Py3, minor cleanup --- 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)")