projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e07fc5
)
Guard C++ declarations with a directive.
author
Robert Bradshaw
<robertwb@gmail.com>
Tue, 21 Aug 2012 07:51:23 +0000
(
00:51
-0700)
committer
Robert Bradshaw
<robertwb@gmail.com>
Tue, 21 Aug 2012 08:38:27 +0000
(
01:38
-0700)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index
ff3ef5f
..
ed823b3
100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-1174,6
+1174,8
@@
class CppClassNode(CStructOrUnionDefNode, BlockNode):
# templates [string] or None
def declare(self, env):
+ if self.visibility != 'extern' and not env.directives['experimental_cpp_class_def']:
+ error(self.pos, "C++ classes need to be declared extern unless experimental_cpp_class_def enabled")
if self.templates is None:
template_types = None
else: