Normalize WTK_declare_builtin_type -> declare_builtin_type.
authorW. Trevor King <wking@drexel.edu>
Fri, 4 Mar 2011 17:11:09 +0000 (12:11 -0500)
committerW. Trevor King <wking@drexel.edu>
Fri, 4 Mar 2011 17:11:09 +0000 (12:11 -0500)
Cython/Compiler/Builtin.py
Cython/Compiler/Symtab.py

index 26ed45b5b7bf06a07b172c9a8a20380bc63c75c0..34273c40d05771804a1a867e8955d8ecff5f51e6 100644 (file)
@@ -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)
index e849d1b13027c24d3182614cde0210b5275a565b..19bbeaa091e444bce49485ef40467aed9d973b37 100644 (file)
@@ -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)