Commit a34888ed authored by Stefan Behnel's avatar Stefan Behnel

'#define PyString_Type PyBytes_Type' in Py3: 'str' is considered a builtin and...

'#define PyString_Type PyBytes_Type' in Py3: 'str' is considered a builtin and internally mapped to PyString_Type, which must also work in Py3
parent 3d4b6c39
...@@ -425,6 +425,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -425,6 +425,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln("#if PY_MAJOR_VERSION >= 3") code.putln("#if PY_MAJOR_VERSION >= 3")
code.putln(" #define PyBaseString_Type PyUnicode_Type") 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_Type PyLong_Type")
code.putln(" #define PyInt_Check(op) PyLong_Check(op)") code.putln(" #define PyInt_Check(op) PyLong_Check(op)")
code.putln(" #define PyInt_CheckExact(op) PyLong_CheckExact(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