• Kirill Smelkov's avatar
    libgolang: Switch _makechan to panic instead of return NULL on failure · d99bb6b7
    Kirill Smelkov authored
    - it is in Go style to panic on memory allocation failure.
    - _makechan can already panic, instead of returning NULL, on e.g. ch._mu
      initialization failure.
    - we were already not checking in several places for NULL after
      _makechan() call (e.g. in golang/runtime/libgolang_test_c.c).
    
    This switches _makechan to panic on memory allocation failure and
    settles on style of future C-level API calls to panic instead of
    returning NULL on failure.
    d99bb6b7
libgolang.h 13.1 KB