summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-06-11 16:38:06 +0200
committerTyge Løvset <[email protected]>2021-06-11 16:38:06 +0200
commitb8f24b90481d83d06ae89e2594c249c9741dae21 (patch)
tree84e8c3807f97221435ec5191e17fb0e8b78e483e /include
parentc7944e2ddb51819dfaee9dd8d3708df54bd5a5d1 (diff)
downloadSTC-modified-b8f24b90481d83d06ae89e2594c249c9741dae21.tar.gz
STC-modified-b8f24b90481d83d06ae89e2594c249c9741dae21.zip
Improve naming of c_sv() and c_lit() in csview.h: Rename c_sv(cstr) => cstr_sv(cstr), and c_lit(string literal) => c_sv(string literal). Hopefully not too much used yet, as they are fairly new.
Diffstat (limited to 'include')
-rw-r--r--include/stc/csview.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/stc/csview.h b/include/stc/csview.h
index eb787a72..04133437 100644
--- a/include/stc/csview.h
+++ b/include/stc/csview.h
@@ -28,12 +28,13 @@
typedef struct { const char* str; size_t size; } csview;
typedef struct { const char *ref; } csview_iter_t;
typedef char csview_value_t;
+
#define csview_null c_make(csview){"", 0}
#define csview_npos cstr_npos
#define csview_ARG(sv) (int)(sv).size, (sv).str
-#define c_lit(literal) csview_lit(literal)
-#define c_sv(s) csview_from_s(s)
+#define c_sv(literal) csview_lit(literal)
+#define cstr_sv(s) csview_from_s(s)
#define csview_lit(literal) \
c_make(csview){literal, sizeof c_make(strlit_t){literal} - 1}