• David Gibson's avatar
    bytestring: Add initializer macro · 2ecae4f3
    David Gibson authored
    The BYTESTRING macro is constant, since it's designed to take a string
    literal, but it doesn't count as constant since it involves an (inlined)
    function call.  That means it can't be used in a static storage duration
    initializer.
    
    Unfortunately, I can't see a portable way to make something which can be
    used as an initializer, but which can also be used in other contexts where
    BYTESTRING() can be used, so this patch introduces BYTESTRING_INIT() which
    is similar to BYTESTRING() but produces an initializer.
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    2ecae4f3
bytestring.h 8.91 KB