objstruct_cname = None
else:
objstruct_cname = 'Py%sObject' % name.capitalize()
- the_type = builtin_scope.declare_builtin_type(name, cname, utility, objstruct_cname)
+ binding = Binding(
+ name = name, cname = cname, extern = 1, c_visibility = 'public')
+ the_type = builtin_scope.declare_builtin_type(
+ binding, objstruct_cname = objstruct_cname, utility_code = utility)
builtin_types[name] = the_type
for method in methods:
method.declare_in_type(the_type)
entry.as_variable = var_entry
return entry
- def declare_builtin_type(self, name, cname, utility_code = None, objstruct_cname = None):
- binding = self._WTK_setup(name, cname, visibility='extern')
- return self.WTK_declare_builtin_type(binding, objstruct_cname, utility_code)
-
- def WTK_declare_builtin_type(self, binding, objstruct_cname = None, utility_code = None):
+ def declare_builtin_type(self, binding, objstruct_cname = None,
+ utility_code = None):
binding.name = EncodedString(binding.name)
- type = PyrexTypes.BuiltinObjectType(binding.name, binding.cname, objstruct_cname)
+ type = PyrexTypes.BuiltinObjectType(
+ binding.name, binding.cname, objstruct_cname)
# WTK: TODO: visibility checking
scope = CClassScope(
binding.name, outer_scope = None, extern = 1)