From 972aa23a674f743c187e82444c2271aaa3e9cd06 Mon Sep 17 00:00:00 2001 From: tylov Date: Sun, 13 Aug 2023 17:38:10 +0200 Subject: Removed csview_null - use csview_init(). --- src/cregex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/cregex.c b/src/cregex.c index ac94a5dd..975a5104 100644 --- a/src/cregex.c +++ b/src/cregex.c @@ -1220,7 +1220,7 @@ _build_subst(const char* replace, int nmatch, const csview match[], cstr_buf buf = cstr_buffer(subst); intptr_t len = 0, cap = buf.cap; char* dst = buf.data; - cstr mstr = cstr_null; + cstr mstr = cstr_init(); while (*replace != '\0') { if (*replace == '$') { @@ -1293,8 +1293,8 @@ cregex_find_pattern_4(const char* pattern, const char* input, cstr cregex_replace_sv_6(const cregex* re, csview input, const char* replace, int count, bool (*mfun)(int, csview, cstr*), int rflags) { - cstr out = cstr_null; - cstr subst = cstr_null; + cstr out = cstr_init(); + cstr subst = cstr_init(); csview match[CREG_MAX_CAPTURES]; int nmatch = cregex_captures(re) + 1; if (!count) count = INT32_MAX; -- cgit v1.2.3