Commit 511d09f0 authored by Stefan Behnel's avatar Stefan Behnel

[has|get|set]attr() optimisation (fix for setattr)

parent c47a68ab
...@@ -515,7 +515,7 @@ class BuiltinScope(Scope): ...@@ -515,7 +515,7 @@ class BuiltinScope(Scope):
builtin_functions = { builtin_functions = {
"hasattr": ["PyObject_HasAttr", c_bint_type, (py_object_type, py_object_type)], "hasattr": ["PyObject_HasAttr", c_bint_type, (py_object_type, py_object_type)],
"getattr": ["PyObject_GetAttr", py_object_type, (py_object_type, py_object_type)], "getattr": ["PyObject_GetAttr", py_object_type, (py_object_type, py_object_type)],
"setattr": ["PyObject_SetAttr", c_bint_type, (py_object_type, py_object_type), -1], "setattr": ["PyObject_SetAttr", c_bint_type, (py_object_type, py_object_type, py_object_type), -1],
"cmp": ["PyObject_Compare", c_int_type, (py_object_type, py_object_type), None, True], "cmp": ["PyObject_Compare", c_int_type, (py_object_type, py_object_type), None, True],
"repr": ["PyObject_Repr", py_object_type, (py_object_type, ), 0], "repr": ["PyObject_Repr", py_object_type, (py_object_type, ), 0],
# "str": ["PyObject_Str", py_object_type, (py_object_type, ), 0], # "str": ["PyObject_Str", py_object_type, (py_object_type, ), 0],
......
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