summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ModuleNode.py
diff options
context:
space:
mode:
authorRobert Bradshaw <robertwb@gmail.com>2014-07-17 00:47:30 -0700
committerRobert Bradshaw <robertwb@gmail.com>2014-07-17 00:47:30 -0700
commitfe73aba5a6a386000df7550ea1a2ff6bd99bd562 (patch)
tree41e97c6a618d5a4c95bc3c5f182387274533a36d /Cython/Compiler/ModuleNode.py
parent49d90c94815b9987156a6dc158fc724ae383749e (diff)
downloadcython-fe73aba5a6a386000df7550ea1a2ff6bd99bd562.tar.gz
Support @staticmethod decorator for C++ classes.
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r--Cython/Compiler/ModuleNode.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index 8483fb452..a3000fced 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -826,7 +826,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
has_virtual_methods = False
has_destructor = False
for attr in scope.var_entries:
- if attr.type.is_cfunction and attr.name != "<init>":
+ if attr.type.is_cfunction and attr.type.is_static_method:
+ code.put("static ")
+ elif attr.type.is_cfunction and attr.name != "<init>":
code.put("virtual ")
has_virtual_methods = True
if attr.cname[0] == '~':