From b40647b88b364c254967dc064b0c9148626c697b Mon Sep 17 00:00:00 2001 From: Nic Barker Date: Fri, 10 Jan 2025 12:59:36 +1300 Subject: [PATCH] update new clay string const macro to include literal check --- clay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clay.h b/clay.h index cc639ff8..3aa44c3c 100644 --- a/clay.h +++ b/clay.h @@ -99,7 +99,7 @@ // Note: If an error led you here, it's because CLAY_STRING can only be used with string literals, i.e. CLAY_STRING("SomeString") and not CLAY_STRING(yourString) #define CLAY_STRING(string) (CLAY__INIT(Clay_String) { .length = CLAY__STRING_LENGTH(CLAY__ENSURE_STRING_LITERAL(string)), .chars = (string) }) -#define CLAY_STRING_CONST(string) { .length = CLAY__STRING_LENGTH(string), .chars = (string) } +#define CLAY_STRING_CONST(string) { .length = CLAY__STRING_LENGTH(CLAY__ENSURE_STRING_LITERAL(string)), .chars = (string) } static uint8_t CLAY__ELEMENT_DEFINITION_LATCH;