summaryrefslogtreecommitdiff
path: root/include/al/str.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/al/str.h')
-rw-r--r--include/al/str.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/al/str.h b/include/al/str.h
index cb7c98f..20a1c26 100644
--- a/include/al/str.h
+++ b/include/al/str.h
@@ -16,8 +16,7 @@ typedef struct {
#define al_str_at(s, index) (s)->data[index]
#define al_str_atr(s, index) (s)->data[(s)->length - (index)]
-#define al_chars_if_literal(s) ((char *)("" s "")) // use al_str_cs/cr for non-static arrays.
-#define al_str_c(c) ((str){ (u32)(sizeof(c) - 1), 0, al_chars_if_literal(c) })
+#define al_str_c(c) ((str){ (u32)(sizeof(c) - 1), 0, AL_CHARS_IF_LITERAL(c) })
#define al_str_cs(c) ((str){ (u32)al_strnlen(c, sizeof(c)), 0, ((char *)(c)) }) // (s)ized
#define al_str_cr(c) ((str){ (u32)al_strnlen(c, MAX_ALLOC_32), 0, ((char *)(c)) }) // (r)untime