• Kirill Smelkov's avatar
    golang: tests: pypanicWhenBlocked: Fix thinko in __exit__ · b5a2f9dc
    Kirill Smelkov authored
    The code was assigning nil to local, _not_ global _tblockforever. As a
    result _tblockforever was left set with a test hook even after leaving
    test context. Fix it.
    
    The bug was there starting from 3b241983 (Port/move channels to
    C/C++/Pyx).
    
    Had to change `= nil` to `= NULL` because with nil Cython complains as
    
            def __exit__(pypanicWhenBlocked t, typ, val, tb):
                global _tblockforever
                _tblockforever = nil
                                ^
        ------------------------------------------------------------
    
        golang/_golang_test.pyx:86:25: Cannot assign type 'nullptr_t' to 'void (*)(void) nogil'
    
    This is https://github.com/cython/cython/issues/3314.
    b5a2f9dc
_golang_test.pyx 12.4 KB