From 8d14edc3ef362138c3cc5b02d846ca923df34190 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sun, 23 Jan 2011 02:14:49 -0800 Subject: [PATCH] Remove "complex already builtin" warning from cpython module. --- Cython/Compiler/Nodes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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( -- 2.26.2