summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authortylov <[email protected]>2023-08-13 17:38:10 +0200
committertylov <[email protected]>2023-08-13 17:38:10 +0200
commit972aa23a674f743c187e82444c2271aaa3e9cd06 (patch)
treeb39b5e9e36c0251a06d40090a26c8e8da5a2167e /src
parent1802558d41112e99d965000c97c45ebf7984d70c (diff)
downloadSTC-modified-972aa23a674f743c187e82444c2271aaa3e9cd06.tar.gz
STC-modified-972aa23a674f743c187e82444c2271aaa3e9cd06.zip
Removed csview_null - use csview_init().
Diffstat (limited to 'src')
-rw-r--r--src/cregex.c6
1 files changed, 3 insertions, 3 deletions
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;