From: Stefan Behnel Date: Sat, 15 Sep 2007 10:56:40 +0000 (+0200) Subject: another signature fix, support for issubclass() and callable() X-Git-Tag: 0.9.6.14~29^2~129^2~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ab33874cad47e13d3726967fc809c7b1bbcb5c42;p=cython.git another signature fix, support for issubclass() and callable() --- diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index beb4c435..b7024e7f 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -515,12 +515,14 @@ 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, py_object_type), -1], + "setattr": ["PyObject_SetAttr", c_int_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], "unicode": ["PyObject_Unicode", py_object_type, (py_object_type, ), 0], "isinstance": ["PyObject_IsInstance", c_bint_type, (py_object_type, py_object_type), -1], + "issubclass": ["PyObject_IsSubclass", c_bint_type, (py_object_type, py_object_type), -1], + "callable":["PyCallable_Check", c_bint_type, (py_object_type, )], "hash": ["PyObject_Hash", c_long_type, (py_object_type, ), -1, True], "type": ["PyObject_Type", py_object_type, (py_object_type, ), 0], "len": ["PyObject_Size", c_py_ssize_t_type, (py_object_type, ), -1],