diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2013-08-10 12:12:45 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2013-08-10 12:12:45 +0200 |
commit | 23ef44c7b26041b32d7274fb485f84a03df654ce (patch) | |
tree | 5df11e2732fafa236fed3b896246cbf17c142939 /Cython/Compiler/ModuleNode.py | |
parent | ace2e6f9d1cca58bcf2c055e81981385f2caa1d4 (diff) | |
download | cython-23ef44c7b26041b32d7274fb485f84a03df654ce.tar.gz |
avoid generating empty PyMethodDef array for types (especially closures)
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index a48204257..db7266ec4 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -1820,6 +1820,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): "};") def generate_method_table(self, env, code): + if env.is_c_class_scope and not env.pyfunc_entries: + return code.putln("") code.putln( "static PyMethodDef %s[] = {" % |