From 5ec606e5dfdbaebe22717d094b58ee7f365ffd9c Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Sun, 6 Nov 2022 15:52:16 +0100 Subject: Added c_autodrop() macro, and removed c_autobuf() which wasn't that useful (and was undocumented). --- examples/regex_replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/regex_replace.c') diff --git a/examples/regex_replace.c b/examples/regex_replace.c index e6054d9f..13bc9bf0 100644 --- a/examples/regex_replace.c +++ b/examples/regex_replace.c @@ -35,7 +35,7 @@ int main() printf("brack: %s\n", cstr_str(&str)); /* Shows how to compile RE separately */ - c_with (cregex re = cregex_from(pattern, cre_default), cregex_drop(&re)) { + c_autodrop (cregex, re, cregex_from(pattern, cre_default)) { if (cregex_captures(&re) == 0) continue; // break c_with /* European date format. */ -- cgit v1.2.3