[has|get|set]attr() optimisation (fix for setattr)
authorStefan Behnel <scoder@users.berlios.de>
Sat, 15 Sep 2007 10:43:21 +0000 (12:43 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 15 Sep 2007 10:43:21 +0000 (12:43 +0200)
Cython/Compiler/Symtab.py

index 18720d10028937f7b0a5b1ad5be7e35d540c3b50..beb4c435e41976288127a629b052e875f457a807 100644 (file)
@@ -515,7 +515,7 @@ class BuiltinScope(Scope):
     builtin_functions = {
       "hasattr": ["PyObject_HasAttr", c_bint_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],
       "repr":    ["PyObject_Repr", py_object_type, (py_object_type, ), 0],
 #      "str":     ["PyObject_Str", py_object_type, (py_object_type, ), 0],