Mercurial > hg > MonetDB-extend
changeset 30:543dccbc169b
Some fixes to comments and code.
The bulk versions of the match functions do not have an anti parameter.
author | Sjoerd Mullender <sjoerd@acm.org> |
---|---|
date | Fri, 14 Jun 2019 13:56:30 +0200 (2019-06-14) |
parents | e44cffee8312 |
children | 3510e17287e6 |
files | regexp/regexp.c |
diffstat | 1 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/regexp/regexp.c Mon Aug 06 20:59:23 2018 +0200 +++ b/regexp/regexp.c Fri Jun 14 13:56:30 2019 +0200 @@ -26,7 +26,8 @@ #define __declspec(x) /* nothing */ #endif -/* these six functions are the only externally visible functions; on +/* these eight functions are the only externally visible functions + * since they are the only ones that are called from the MAL layer; on * Windows they must be exported, on other systems, declaring them as * extern is enough */ extern __declspec(dllexport) char *regexpmatch(bit *ret, const char **val, const char **pat); @@ -35,6 +36,8 @@ extern __declspec(dllexport) char *regexpmatchfselect(bat *ret, const bat *bid, const bat *sid, const char **pat, const char **flags, const bit *anti); extern __declspec(dllexport) char *regexpmatchjoin(bat *lres, bat *rres, const bat *lid, const bat *rid, const bat *sl, const bat *sr, const bit *nil_matches, const lng *estimate); extern __declspec(dllexport) char *regexpmatchfjoin(bat *lres, bat *rres, const bat *lid, const bat *rid, const char **flags, const bat *sl, const bat *sr, const bit *nil_matches, const lng *estimate); +extern __declspec(dllexport) char *regexpmatchbulk(bat *ret, const bat *bid, const char **pat); +extern __declspec(dllexport) char *regexpmatchfbulk(bat *ret, const bat *bid, const char **pat, const char **flags); static int parseflags(const char *flags) @@ -110,7 +113,7 @@ } static char * -do_matchbulk(bat *ret, bat bid, const char *pat, const char *flags, bit anti) +do_matchbulk(bat *ret, bat bid, const char *pat, const char *flags) { BAT *b; /* input BAT */ BATiter bi; /* helper to loop through values */ @@ -158,9 +161,9 @@ throw(MAL, "batregexp.rematch", "bad flag character"); } - /* allocate a result BAT; the capacity we ask for is the the - * size of the input BAT since we produce a value for each - * input value */ + /* allocate a result BAT; the capacity we ask for is the size + * of the input BAT since we produce a value for each input + * value */ bn = COLnew(b->hseqbase, TYPE_bit, BATcount(b), TRANSIENT); if (bn == NULL) { BBPunfix(b->batCacheid); @@ -254,16 +257,16 @@ } char * -regexpmatchbulk(bat *ret, const bat *bid, const char **pat, const bit *anti) +regexpmatchbulk(bat *ret, const bat *bid, const char **pat) { - return do_matchbulk(ret, *bid, *pat, "", *anti); + return do_matchbulk(ret, *bid, *pat, ""); } char * -regexpmatchfbulk(bat *ret, const bat *bid, const char **pat, const char **flags, const bit *anti) +regexpmatchfbulk(bat *ret, const bat *bid, const char **pat, const char **flags) { - return do_matchbulk(ret, *bid, *pat, *flags, *anti); + return do_matchbulk(ret, *bid, *pat, *flags); } static char *