Commit 1b401b30 authored by Stefan Behnel's avatar Stefan Behnel

re-enable PyMethodDef declarations of Python methods in cdef classes as we...

re-enable PyMethodDef declarations of Python methods in cdef classes as we cannot currently generate CyFunctions for cpdef methods
parent a04806bd
...@@ -1973,7 +1973,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -1973,7 +1973,7 @@ 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 or env.directives['binding']): if env.is_c_class_scope and not env.pyfunc_entries:
return return
code.putln("") code.putln("")
code.putln( code.putln(
......
...@@ -477,7 +477,7 @@ class MethodTableSlot(SlotDescriptor): ...@@ -477,7 +477,7 @@ class MethodTableSlot(SlotDescriptor):
# Slot descriptor for the method table. # Slot descriptor for the method table.
def slot_code(self, scope): def slot_code(self, scope):
if scope.pyfunc_entries and not scope.directives['binding']: if scope.pyfunc_entries:
return scope.method_table_cname return scope.method_table_cname
else: else:
return "0" return "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