Remove "complex already builtin" warning from cpython module.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sun, 23 Jan 2011 10:14:49 +0000 (02:14 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sun, 23 Jan 2011 10:14:49 +0000 (02:14 -0800)
Cython/Compiler/Nodes.py

index b2cbcb496deda3a0eda8d62ba9fc4cfc1c00c24b..35d2b88a0e58c28b484b9de8425b974152f2e338 100644 (file)
@@ -3223,7 +3223,9 @@ class CClassDefNode(ClassDefNode):
             home_scope = env
 
         if self.visibility == 'extern':
-            if self.module_name == '__builtin__' and self.class_name in Builtin.builtin_types:
+            if (self.module_name == '__builtin__' and
+                self.class_name in Builtin.builtin_types and
+                env.qualified_name[:8] != 'cpython.'): # allow overloaded names for cimporting from cpython
                 warning(self.pos, "%s already a builtin Cython type" % self.class_name, 1)
 
         self.entry = home_scope.declare_c_class(