hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 82777ab3211a061bc582b373647c426b605a163d
parent cc91bb81d7839b780804028123230ce4fabb880e
Author: Vlad-Stefan Harbuz <vlad@vladh.net>
Date:   Sat, 14 May 2022 17:24:59 +0100

regex: rename regex_finish to finish

Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>

Diffstat:
Mregex/README | 2+-
Mregex/regex.ha | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/regex/README b/regex/README @@ -18,7 +18,7 @@ This module implements the POSIX match disambiguation rules by returning the longest match among the leftmost matches. const re = regex::compile(`[Hh]are`)!; - defer regex::regex_finish(&re); + defer regex::finish(&re); const does_match = regex::test(&re, "Hello Hare, hello Hare.")!; fmt::printfln("matched? {}", does_match)!; diff --git a/regex/regex.ha b/regex/regex.ha @@ -99,7 +99,7 @@ export type regex = struct { }; // Frees the memory used by a regex. -export fn regex_finish(re: *regex) void = { +export fn finish(re: *regex) void = { free(re.insts); for (let i = 0z; i < len(re.charsets); i += 1) { free(re.charsets[i]);