Commit 11b2d3a3 authored by Stefan Behnel's avatar Stefan Behnel

fix intern() builtin in Py3

parent 21502893
......@@ -24,7 +24,7 @@ builtin_function_table = [
#('hex', "", "", ""),
#('id', "", "", ""),
#('input', "", "", ""),
('intern', "s", "O", "PyString_InternFromString"),
('intern', "s", "O", "__Pyx_InternFromString"),
('isinstance', "OO", "b", "PyObject_IsInstance"),
('issubclass', "OO", "b", "PyObject_IsSubclass"),
('iter', "O", "O", "PyObject_GetIter"),
......@@ -118,8 +118,18 @@ bad:
}
"""]
intern_utility_code = ["""
#if PY_MAJOR_VERSION >= 3
# define __Pyx_InternFromString(s) PyUnicode_InternFromString(s)
#else
# define __Pyx_InternFromString(s) PyString_InternFromString(s)
#endif
""","""
"""]
builtin_utility_code = {
'getattr3': getattr3_utility_code,
'intern' : intern_utility_code,
}
builtin_scope = BuiltinScope()
......
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