From: Robert Bradshaw Date: Sun, 23 Jan 2011 10:14:49 +0000 (-0800) Subject: Remove "complex already builtin" warning from cpython module. X-Git-Tag: 0.14.1rc2~2 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=8d14edc3ef362138c3cc5b02d846ca923df34190;p=cython.git Remove "complex already builtin" warning from cpython module. --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index b2cbcb49..35d2b88a 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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(