• Nils Goroll's avatar
    assert() for VGC and arm assertions on ctx->method · 88c59685
    Nils Goroll authored
    We wrap VAS_Fail() as VPI_Fail() and add an assert() macro to the
    Varnish Generated C (VGC) code. This assert() definition is basically
    a copy of that in vas.h, but deliberately added to a source file which
    is only used by generate.py for VGC, such that this slightly different
    definition be only visible to VGC.
    
    I also pondered the option to include VCL source information in
    VPI_Fail: By using the information updated by VPI_count(), we could
    have that, but as the assert is, for now, intended only to ensure
    correctness of VCC and core VRT code, I decided against this
    complication.
    
    With assert() in place for VGC, we arm the assertions from
    75acb5cc
    88c59685
vcc_assert.h 135 Bytes