summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLisandro Dalcin <dalcinl@gmail.com>2017-11-02 12:53:50 +0300
committerLisandro Dalcin <dalcinl@gmail.com>2017-11-04 15:11:50 +0300
commitda8e2ad3f3bf70b0e66430c4a49b4893761ff2a3 (patch)
treef33d53ab896aba293c633c7a24ce35d828a361de
parente9dbd6dfd97ec5b21aa3057a8b6596d3b4ba709e (diff)
downloadcython-dalcinl/fix-cpdef-warning.tar.gz
Fix cpdef methods to not emit redeclared warning (see #1874)dalcinl/fix-cpdef-warning
-rw-r--r--Cython/Compiler/Symtab.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
index d9e7c4340..2ab1d5185 100644
--- a/Cython/Compiler/Symtab.py
+++ b/Cython/Compiler/Symtab.py
@@ -2105,8 +2105,7 @@ class CClassScope(ClassScope):
if name == "__new__":
error(pos, "__new__ method of extension type will change semantics "
"in a future version of Pyrex and Cython. Use __cinit__ instead.")
- entry = self.declare_var(name, py_object_type, pos,
- visibility='extern')
+ entry = self.declare_var(name, py_object_type, pos, visibility='ignore')
special_sig = get_special_method_signature(name)
if special_sig:
# Special methods get put in the method table with a particular