Commit 61e95f53 authored by Stefan Behnel's avatar Stefan Behnel

fix PyString_CheckExact definition in Py3, minor cleanup

parent b0ed60f9
......@@ -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)")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment