result = "%s(%s)" % (self.function.result_code,
join(arg_list_code, ","))
if self.wrapper_call or \
- self.function.entry.is_unbound_cmethod and self.function.entry.is_overridable:
+ self.function.entry.is_unbound_cmethod and self.function.entry.type.is_overridable:
result = "(%s = 1, %s)" % (Naming.skip_dispatch_cname, result)
return result
ubcm_entry.is_cfunction = 1
ubcm_entry.func_cname = entry.func_cname
ubcm_entry.is_unbound_cmethod = 1
- ubcm_entry.is_overridable = entry.is_overridable
self.mutate_into_name_node(env, ubcm_entry, None)
return 1
return 0
# may be different if we're overriding a C method inherited
# from the base type of an extension type.
self.type = type
+ type.is_overridable = self.overridable
name = name_declarator.name
cname = name_declarator.cname
self.entry = env.declare_cfunction(
cname = cname, visibility = self.visibility,
defining = self.body is not None,
api = self.api)
- self.entry.is_overridable = self.overridable
self.return_type = type.return_type
if self.overridable:
def __init__(self, return_type, args, has_varargs = 0,
exception_value = None, exception_check = 0, calling_convention = "",
- nogil = 0, with_gil = 0):
+ nogil = 0, with_gil = 0, is_overridable = 0):
self.return_type = return_type
self.args = args
self.has_varargs = has_varargs
self.calling_convention = calling_convention
self.nogil = nogil
self.with_gil = with_gil
+ self.is_overridable = is_overridable
def __repr__(self):
arg_reprs = map(repr, self.args)
return 1
if not other_type.is_cfunction:
return 0
+ if self.is_overridable != other_type.is_overridable:
+ return 0
nargs = len(self.args)
if nargs <> len(other_type.args):
return 0
defined_in_pxd = 0
api = 0
utility_code = None
+ is_overridable = 0
def __init__(self, name, cname, type, pos = None, init = None):
self.name = name