Changeset: 20f1242657c0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/20f1242657c0 Modified Files: monetdb5/modules/atoms/str.c monetdb5/modules/kernel/batstr.c monetdb5/modules/mal/pcre.c monetdb5/modules/mal/txtsim.c sql/backends/monet5/sql.c sql/backends/monet5/sql_user.c Branch: default Log Message:
Merge with Dec2023 branch. diffs (truncated from 1102 to 300 lines): diff --git a/monetdb5/modules/atoms/str.c b/monetdb5/modules/atoms/str.c --- a/monetdb5/modules/atoms/str.c +++ b/monetdb5/modules/atoms/str.c @@ -3514,7 +3514,7 @@ STRlike(const char *s, const char *pat, } static str -STRlikewrap3(bit *ret, const str *s, const str *pat, const str *esc) +STRlikewrap3(bit *ret, const char *const *s, const char *const *pat, const char *const *esc) { if (strNil(*s) || strNil(*pat) || strNil(*esc)) *ret = bit_nil; @@ -3524,7 +3524,7 @@ STRlikewrap3(bit *ret, const str *s, con } static str -STRlikewrap(bit *ret, const str *s, const str *pat) +STRlikewrap(bit *ret, const char *const *s, const char *const *pat) { if (strNil(*s) || strNil(*pat)) *ret = bit_nil; @@ -3534,7 +3534,7 @@ STRlikewrap(bit *ret, const str *s, cons } static str -STRtostr(str *res, const str *src) +STRtostr(str *res, const char *const *src) { if (*src == 0) *res = GDKstrdup(str_nil); @@ -3546,7 +3546,7 @@ STRtostr(str *res, const str *src) } static str -STRLength(int *res, const str *arg1) +STRLength(int *res, const char *const *arg1) { const char *s = *arg1; @@ -3555,7 +3555,7 @@ STRLength(int *res, const str *arg1) } static str -STRBytes(int *res, const str *arg1) +STRBytes(int *res, const char *const *arg1) { const char *s = *arg1; @@ -3579,7 +3579,7 @@ str_tail(str *buf, size_t *buflen, const } static str -STRTail(str *res, const str *arg1, const int *offset) +STRTail(str *res, const char *const *arg1, const int *offset) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -3635,7 +3635,7 @@ str_Sub_String(str *buf, size_t *buflen, } static str -STRSubString(str *res, const str *arg1, const int *offset, const int *length) +STRSubString(str *res, const char *const *arg1, const int *offset, const int *length) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -3724,7 +3724,7 @@ str_wchr_at(int *res, const char *s, int } static str -STRWChrAt(int *res, const str *arg1, const int *at) +STRWChrAt(int *res, const char *const *arg1, const int *at) { return str_wchr_at(res, *arg1, *at); } @@ -3737,7 +3737,7 @@ str_lower(str *buf, size_t *buflen, cons } static inline str -STRlower(str *res, const str *arg1) +STRlower(str *res, const char *const *arg1) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -3778,7 +3778,7 @@ str_upper(str *buf, size_t *buflen, cons } static str -STRupper(str *res, const str *arg1) +STRupper(str *res, const char *const *arg1) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -3974,10 +3974,11 @@ STRstr_search(Client cntxt, MalBlkPtr mb (void) cntxt; (void) mb; bit *res = getArgReference(stk, pci, 0); - const str *haystack = getArgReference(stk, pci, 1), - *needle = getArgReference(stk, pci, 2); + const char *const *haystack = getArgReference(stk, pci, 1); + const char *const *needle = getArgReference(stk, pci, 2); bit icase = pci->argc == 4 && *getArgReference_bit(stk, pci, 3); - str s = *haystack, h = *needle, msg = MAL_SUCCEED; + const char *s = *haystack, *h = *needle; + char *msg = MAL_SUCCEED; if (strNil(s) || strNil(h)) { *res = bit_nil; } else { @@ -4035,10 +4036,11 @@ STRrevstr_search(Client cntxt, MalBlkPtr (void) cntxt; (void) mb; bit *res = getArgReference(stk, pci, 0); - const str *haystack = getArgReference(stk, pci, 1); - const str *needle = getArgReference(stk, pci, 2); + const char *const *haystack = getArgReference(stk, pci, 1); + const char *const *needle = getArgReference(stk, pci, 2); bit icase = pci->argc == 4 && *getArgReference_bit(stk, pci, 3); - str s = *haystack, h = *needle, msg = MAL_SUCCEED; + const char *s = *haystack, *h = *needle; + char *msg = MAL_SUCCEED; if (strNil(s) || strNil(h)) { *res = bit_nil; } else { @@ -4207,7 +4209,7 @@ str_strip(str *buf, size_t *buflen, cons /* remove all whitespace from either side of arg1 */ static str -STRStrip(str *res, const str *arg1) +STRStrip(str *res, const char *const *arg1) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -4248,7 +4250,7 @@ str_ltrim(str *buf, size_t *buflen, cons /* remove all whitespace from the start (left) of arg1 */ static str -STRLtrim(str *res, const str *arg1) +STRLtrim(str *res, const char *const *arg1) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -4289,7 +4291,7 @@ str_rtrim(str *buf, size_t *buflen, cons /* remove all whitespace from the end (right) of arg1 */ static str -STRRtrim(str *res, const str *arg1) +STRRtrim(str *res, const char *const *arg1) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -4369,7 +4371,7 @@ str_strip2(str *buf, size_t *buflen, con /* remove the longest string containing only characters from arg2 from * either side of arg1 */ static str -STRStrip2(str *res, const str *arg1, const str *arg2) +STRStrip2(str *res, const char *const *arg1, const char *const *arg2) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1, *s2 = *arg2; @@ -4423,7 +4425,7 @@ str_ltrim2(str *buf, size_t *buflen, con /* remove the longest string containing only characters from arg2 from * the start (left) of arg1 */ static str -STRLtrim2(str *res, const str *arg1, const str *arg2) +STRLtrim2(str *res, const char *const *arg1, const char *const *arg2) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1, *s2 = *arg2; @@ -4477,7 +4479,7 @@ str_rtrim2(str *buf, size_t *buflen, con /* remove the longest string containing only characters from arg2 from * the end (right) of arg1 */ static str -STRRtrim2(str *res, const str *arg1, const str *arg2) +STRRtrim2(str *res, const char *const *arg1, const char *const *arg2) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1, *s2 = *arg2; @@ -4577,7 +4579,7 @@ str_lpad(str *buf, size_t *buflen, const * Result: ' hi' */ static str -STRLpad(str *res, const str *arg1, const int *len) +STRLpad(str *res, const char *const *arg1, const int *len) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -4618,7 +4620,7 @@ str_rpad(str *buf, size_t *buflen, const * Result: 'hi ' */ static str -STRRpad(str *res, const str *arg1, const int *len) +STRRpad(str *res, const char *const *arg1, const int *len) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -4659,7 +4661,7 @@ str_lpad3(str *buf, size_t *buflen, cons * Result: xyxhi */ static str -STRLpad3(str *res, const str *arg1, const int *len, const str *arg2) +STRLpad3(str *res, const char *const *arg1, const int *len, const char *const *arg2) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1, *s2 = *arg2; @@ -4701,7 +4703,7 @@ str_rpad3(str *buf, size_t *buflen, cons * Result: hixyx */ static str -STRRpad3(str *res, const str *arg1, const int *len, const str *arg2) +STRRpad3(str *res, const char *const *arg1, const int *len, const char *const *arg2) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1, *s2 = *arg2; @@ -4774,7 +4776,7 @@ str_substitute(str *buf, size_t *buflen, } static str -STRSubstitute(str *res, const str *arg1, const str *arg2, const str *arg3, +STRSubstitute(str *res, const char *const *arg1, const char *const *arg2, const char *const *arg3, const bit *g) { str buf = NULL, msg = MAL_SUCCEED; @@ -4803,7 +4805,7 @@ STRSubstitute(str *res, const str *arg1, } static str -STRascii(int *ret, const str *s) +STRascii(int *ret, const char *const *s) { return str_wchr_at(ret, *s, 0); } @@ -4818,7 +4820,7 @@ str_substring_tail(str *buf, size_t *buf } static str -STRsubstringTail(str *res, const str *arg1, const int *start) +STRsubstringTail(str *res, const char *const *arg1, const int *start) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -4856,7 +4858,7 @@ str_sub_string(str *buf, size_t *buflen, } static str -STRsubstring(str *res, const str *arg1, const int *start, const int *ll) +STRsubstring(str *res, const char *const *arg1, const int *start, const int *ll) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -4885,7 +4887,7 @@ STRsubstring(str *res, const str *arg1, } static str -STRprefix(str *res, const str *arg1, const int *ll) +STRprefix(str *res, const char *const *arg1, const int *ll) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -4921,7 +4923,7 @@ str_suffix(str *buf, size_t *buflen, con } static str -STRsuffix(str *res, const str *arg1, const int *ll) +STRsuffix(str *res, const char *const *arg1, const int *ll) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *arg1; @@ -4962,7 +4964,7 @@ str_locate2(const char *needle, const ch } static str -STRlocate3(int *ret, const str *needle, const str *haystack, const int *start) +STRlocate3(int *ret, const char *const *needle, const char *const *haystack, const int *start) { const char *s = *needle, *s2 = *haystack; int st = *start; @@ -4974,7 +4976,7 @@ STRlocate3(int *ret, const str *needle, } static str -STRlocate(int *ret, const str *needle, const str *haystack) +STRlocate(int *ret, const char *const *needle, const char *const *haystack) { const char *s = *needle, *s2 = *haystack; @@ -5015,8 +5017,8 @@ str_insert(str *buf, size_t *buflen, con } static str -STRinsert(str *res, const str *input, const int *start, const int *nchars, - const str *input2) +STRinsert(str *res, const char *const *input, const int *start, const int *nchars, + const char *const *input2) { str buf = NULL, msg = MAL_SUCCEED; const char *s = *input, *s2 = *input2; @@ -5045,7 +5047,7 @@ STRinsert(str *res, const str *input, co } static str _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org