binding = Binding()
binding.pull(self)
binding.name = self.class_name
- self.entry = home_scope.WTK_declare_c_class(
+ self.entry = home_scope.declare_c_class(
binding,
objstruct_cname = self.objstruct_name,
base_type = self.base_type,
entry = module_scope.declare_struct_or_union(
binding, kind = kind, scope = None, pos = pos)
elif kind == 'class':
- entry = module_scope.declare_c_class(name, pos = pos,
- module_name = self.module_name)
+ binding = Binding(name = name)
+ entry = module_scope.declare_c_class(
+ binding, module_name = self.module_name, pos = pos)
else:
submodule_scope = env.context.find_module(name, relative_to = module_scope, pos = self.pos)
if submodule_scope.parent_module is module_scope:
TemplateTransform=object, EncodedString=object,
error=object, warning=object, copy=object)
+from Binding import Binding
import PyrexTypes
import Naming
import ExprNodes
as_name = '%s_%s' % (target_module_scope.next_id(Naming.closure_class_prefix), node.entry.cname)
- entry = target_module_scope.declare_c_class(name = as_name,
- pos = node.pos, defining = True, implementing = True)
+ binding = Binding(name = as_name)
+ entry = target_module_scope.declare_c_class(
+ binding, defining = True, implementing = True, pos = node.pos)
func_scope.scope_class = entry
class_scope = entry.type.scope
class_scope.is_internal = True
if new_code is not None:
self.utility_code_list.append(new_code)
- def declare_c_class(self, name, pos, defining = 0, implementing = 0,
- module_name = None, base_type = None, objstruct_cname = None,
- typeobj_cname = None, visibility = 'private', typedef_flag = 0, api = 0,
- buffer_defaults = None, shadow = 0):
- binding = self._WTK_setup(name, objstruct_cname, visibility)
- binding.api = api
- return self.WTK_declare_c_class(
- binding, objstruct_cname, None, base_type, defining, implementing,
- module_name, typeobj_cname, typedef_flag, buffer_defaults, shadow,
- pos)
-
- def WTK_declare_c_class(
+ def declare_c_class(
self, binding, objstruct_cname = None, type=None, base_type=None,
defining = 0, implementing = 0, module_name = None,
typeobj_cname = None, typedef_flag = 0, buffer_defaults = None,