• Boxiang Sun's avatar
    Enable CPython's macro PyCFunction_GET_FUNCTION. Fixes issue #1260 · e6931d60
    Boxiang Sun authored
    The function PyCFunction_GetFunction(func) check func type should be
    exactly PyCFunction_Type. PyCFunction_GET_FUNCTION(func) does not check
    func type. But assumes func layout starts with PyCFunctionObject. i.e.
    for allowing func to be PyCFunction_Type subclass.
    
    This way an extension which subclasses PyCFunctionObject will get
    into trouble using PyCFunction_GET_FUNCTION() on Pyston
    e6931d60
methodobject.h 3.91 KB