From: ahmedsamyh Date: Fri, 28 Feb 2025 03:33:08 +0000 (+0500) Subject: [commonlib.h] cast cstr -> char* in c_SV() macro. X-Git-Url: https://www.git.momoyon.org/?a=commitdiff_plain;h=581cfed62ee1a8f2a3c109d4ae41c9ac643737f8;p=commonlib.git [commonlib.h] cast cstr -> char* in c_SV() macro. --- diff --git a/commonlib.h b/commonlib.h index fa6f626..12a63c6 100644 --- a/commonlib.h +++ b/commonlib.h @@ -258,7 +258,7 @@ typedef struct { #define c_SV_FMT "%.*s" #define c_SV_ARG(sv) (int)(sv).count, (sv).data -#define c_SV(cstr) (c_String_view){.data = cstr, strlen(cstr)} +#define c_SV(cstr) (c_String_view){.data = (char*)cstr, strlen(cstr)} void c_sv_print_dumb(c_String_view sv); c_String_view c_sv_from_cstr(const char* cstr); // Actually just use SV(cstr) macro...