From cac2cf2277888289f7b3fbba5ac76ade2d315d59 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 3 Nov 2010 20:11:53 +0100 Subject: [PATCH] support overriding builtins with different signatures as long as they map to different C names --- Cython/Compiler/Symtab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.26.2