support overriding builtins with different signatures as long as they map to differen...
authorStefan Behnel <scoder@users.berlios.de>
Wed, 3 Nov 2010 19:11:53 +0000 (20:11 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 3 Nov 2010 19:11:53 +0000 (20:11 +0100)
Cython/Compiler/Symtab.py

index 03d74167464794ed4be30e585eecc0313fb8289f..8f176c8e4d77922fc8e7ddcc532dd3f350e95d2a 100644 (file)
@@ -552,7 +552,7 @@ class Scope(object):
                 warning(pos, "Function '%s' previously declared as '%s'" % (name, entry.visibility), 1)
             if not entry.type.same_as(type):
                 if visibility == 'extern' and entry.visibility == 'extern':
-                    if self.is_cpp():
+                    if self.is_cpp() or (cname and entry.cname and cname != entry.cname):
                         temp = self.add_cfunction(name, type, pos, cname, visibility, modifiers)
                         temp.overloaded_alternatives = entry.all_alternatives()
                         entry = temp