From: Stefan Behnel Date: Wed, 3 Nov 2010 19:11:53 +0000 (+0100) Subject: support overriding builtins with different signatures as long as they map to differen... X-Git-Tag: 0.14.alpha0~241 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cac2cf2277888289f7b3fbba5ac76ade2d315d59;p=cython.git support overriding builtins with different signatures as long as they map to different C names --- diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 03d74167..8f176c8e 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -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