for desc in builtin_function_table:
declare_builtin_func(*desc)
+builtin_types = {}
+
def init_builtin_types():
+ global builtin_types
for name, cname, funcs in builtin_types_table:
utility = builtin_utility_code.get(name)
the_type = builtin_scope.declare_builtin_type(name, cname, utility)
+ builtin_types[name] = the_type
for name, args, ret, cname in funcs:
sig = Signature(args, ret)
the_type.scope.declare_cfunction(name, sig.function_type(), None, cname)
return
else:
home_scope = env
+
+ if self.visibility == 'extern':
+ if self.module_name == '__builtin__' and self.class_name in Builtin.builtin_types:
+ error(self.pos, "%s already a builtin Cython type" % self.class_name)
+ return
+
self.entry = home_scope.declare_c_class(
name = self.class_name,
pos = self.pos,