summaryrefslogtreecommitdiffhomepage
path: root/include/stc/ccommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stc/ccommon.h')
-rw-r--r--include/stc/ccommon.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h
index e87e7678..9624909e 100644
--- a/include/stc/ccommon.h
+++ b/include/stc/ccommon.h
@@ -111,8 +111,11 @@
typedef const char* crawstr;
#define crawstr_cmp(xp, yp) strcmp(*(xp), *(yp))
#define crawstr_hash(p) c_strhash(*(p))
+
#define c_strlen_lit(literal) (sizeof "" literal - 1U)
-#define c_sv(lit) (c_make(csview){lit, c_strlen_lit(lit)})
+#define c_sv(...) c_MACRO_OVERLOAD(c_sv, __VA_ARGS__)
+#define c_sv1(lit) (c_make(csview){lit, c_strlen_lit(lit)})
+#define c_sv2(str, n) (c_make(csview){str, n})
#define c_PRIsv ".*s"
#define c_ARGsv(sv) (int)(sv).size, (sv).str