Fix classmethod for use in cdef classes.
The issue here (as pointed out by Thomas Hunger) is that once the CClass body gets executed the class is already constructed, and its methods are actual methods not functions (as in Python). The CClassScope now returns a utility function on lookup of "classmethod" that creates a class method out of a method (rather than out of a function). When added to the type dictionary, the result is exactly the same as setting the METH_CLASS flag.
Showing
Please register or sign in to comment