• Stefan Behnel's avatar
    Attempt to use a faster exception value for return type annotations that check for exceptions. · a3ffd72f
    Stefan Behnel authored
    Inside of a module, it is safe to convert a function declared
        cdef int func() except *:
            ...
    
    into
    
        cdef int func() except? -1
    
    because a) we need an exception return value anyway and b) there will always be an explicit exception check afterwards. Thus, changing the function implementation itself is safe. We must exclude functions that are only declared but not implemented since we do not control their signature and it is not safe to assume a specific exception return value if it is not declared.
    a3ffd72f
extern_impl.srctree 458 Bytes