use cbuilder for ccgliterals (#24302)

follows up #24259 

This was the only use of the `STRING_LITERAL` macro in `nimbase.h`, so
this macro is now removed. We don't have to remove it though, maybe
people use it.
This commit is contained in:
metagn
2024-10-14 09:46:50 +03:00
committed by GitHub
parent d4b9c147ab
commit 34c87de984
3 changed files with 50 additions and 28 deletions

View File

@@ -469,12 +469,6 @@ typedef char* NCSTRING;
#define NIM_STRLIT_FLAG ((NU)(1) << ((NIM_INTBITS) - 2)) /* This has to be the same as system.strlitFlag! */
#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