summaryrefslogtreecommitdiff
path: root/Cython/Compiler/CythonScope.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-03-11 09:25:15 +0100
committerStefan Behnel <stefan_ml@behnel.de>2018-03-11 09:25:15 +0100
commit139143ee181fb6d4ef151defca10f5882ebce977 (patch)
treeb3285b15f81b93d43d0cd73c130fee35aa75e991 /Cython/Compiler/CythonScope.py
parent084af98bf092404b83aaeb6d48ada5f6f9dc28a0 (diff)
downloadcython-139143ee181fb6d4ef151defca10f5882ebce977.tar.gz
Do not issue "redefined" warnings on C++ function overrides with different signatures (previously only applied to methods).
Closes #2013.
Diffstat (limited to 'Cython/Compiler/CythonScope.py')
-rw-r--r--Cython/Compiler/CythonScope.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Cython/Compiler/CythonScope.py b/Cython/Compiler/CythonScope.py
index 00b912a81..a0cd0e4a1 100644
--- a/Cython/Compiler/CythonScope.py
+++ b/Cython/Compiler/CythonScope.py
@@ -26,6 +26,10 @@ class CythonScope(ModuleScope):
cname='<error>')
entry.in_cinclude = True
+ def is_cpp(self):
+ # Alow C++ utility code in C++ contexts.
+ return self.context.cpp
+
def lookup_type(self, name):
# This function should go away when types are all first-level objects.
type = parse_basic_type(name)