From: W. Trevor King Date: Fri, 4 Mar 2011 17:11:09 +0000 (-0500) Subject: Normalize WTK_declare_builtin_type -> declare_builtin_type. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0191a5f100b874bee6200f002a0f0ed8bce7567a;p=cython.git Normalize WTK_declare_builtin_type -> declare_builtin_type. --- diff --git a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py index 26ed45b5..34273c40 100644 --- a/Cython/Compiler/Builtin.py +++ b/Cython/Compiler/Builtin.py @@ -556,7 +556,10 @@ def init_builtin_types(): 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) diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index e849d1b1..19bbeaa0 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -874,13 +874,11 @@ class BuiltinScope(Scope): 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)