• Robert Bradshaw's avatar
    Fix classmethod for use in cdef classes. · 1d6dbf9d
    Robert Bradshaw authored
    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.
    1d6dbf9d
Symtab.py 51.3 KB