• Nils Goroll's avatar
    Add VRT_AllocStrandsWS() to allocate strands on a workspace · b169266e
    Nils Goroll authored
    So far, we have focused on transitioning vmod arguments to STRANDS.
    
    To take the next step and also return STRANDS (which leverages the
    actual benefit - not copying unmodified strand elements), vmods need
    to allocate a struct strands on the workspace.
    
    This commit adds a utility function for this common task.
    
    Implementation note: A single WS_Alloc() with some pointer arithmetic
    would suffice, but using two results in cleaner code.
    b169266e
cache_vrt.c 20.8 KB