diff --git a/lib/nimbase.h b/lib/nimbase.h index 3b4438331b..2144c84b0c 100644 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -470,6 +470,13 @@ typedef char* NCSTRING; #define NIM_STRLIT_FLAG ((NU)(1) << ((NIM_INTBITS) - 2)) /* This has to be the same as system.strlitFlag! */ +/* unused in codegen after 2.2 but keep for compatibility: */ +#define STRING_LITERAL(name, str, length) \ + static const struct { \ + TGenericSeq Sup; \ + NIM_CHAR data[(length) + 1]; \ + } name = {{length, (NI) ((NU)length | NIM_STRLIT_FLAG)}, str} + /* declared size of a sequence/variable length array: */ #if defined(__cplusplus) && defined(__clang__) # define SEQ_DECL_SIZE 1