• Adam Reichold's avatar
    Adjust memory layout computation of GooString · 17adfc84
    Adam Reichold authored
    GooString uses the small string optimization but the static buffer size is
    hard-coded and hence the final object size becomes dependent on architecture.
    This adds a helper class to compute the memory layout at compile time so that
    the target object size of e.g. 32 or another multiple of 16 is achieved.
    This also adds an overload so that the C string returned by GooString's
    getCString method respect the constness of this and fixes a constness issue
    in the lexer tests.
GooString.h 7.34 KB