Commit 2ca582e4 authored by Stefan Behnel's avatar Stefan Behnel

avoid generating a PyMethodDef entry for the newly implemented CyFunction methods

parent 2eb51aab
...@@ -1975,12 +1975,13 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -1975,12 +1975,13 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
def generate_method_table(self, env, code): def generate_method_table(self, env, code):
if env.is_c_class_scope and not env.pyfunc_entries: if env.is_c_class_scope and not env.pyfunc_entries:
return return
binding = env.directives['binding']
code.putln("") code.putln("")
code.putln( code.putln(
"static PyMethodDef %s[] = {" % ( "static PyMethodDef %s[] = {" % (
env.method_table_cname)) env.method_table_cname))
for entry in env.pyfunc_entries: for entry in env.pyfunc_entries:
if not entry.fused_cfunction: if not entry.fused_cfunction and not (binding and entry.is_overridable):
code.put_pymethoddef(entry, ",") code.put_pymethoddef(entry, ",")
code.putln( code.putln(
"{0, 0, 0, 0}") "{0, 0, 0, 0}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment