Mercurial > hg > MonetDB-extend
changeset 58:02895996506d
make extend compile again
Disabled cxx-reverse as c++ is broken by design
author | Niels Nes <niels@cwi.nl> |
---|---|
date | Fri, 30 Jun 2023 13:11:38 +0200 (21 months ago) |
parents | d77cd888a2f2 |
children | ced72ed0a2b7 |
files | CMakeLists.txt cxx-reverse/reverse.cpp gmean/gmean.c regexp/README.rst regexp/regexp.c reverse/README.rst reverse/reverse.c |
diffstat | 7 files changed, 19 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Thu Mar 24 18:37:39 2022 +0100 +++ b/CMakeLists.txt Fri Jun 30 13:11:38 2023 +0200 @@ -32,7 +32,7 @@ add_custom_command(OUTPUT README.pdf COMMAND "rst2pdf" "${CMAKE_SOURCE_DIR}/README.rst" "-o" "README.pdf") -add_subdirectory(cxx-reverse) +#add_subdirectory(cxx-reverse) add_subdirectory(regexp) add_subdirectory(reverse) add_subdirectory(monetdbe)
--- a/cxx-reverse/reverse.cpp Thu Mar 24 18:37:39 2022 +0100 +++ b/cxx-reverse/reverse.cpp Fri Jun 30 13:11:38 2023 +0200 @@ -156,7 +156,7 @@ BBPunfix(b->batCacheid); *retval = bn->batCacheid; - BBPkeepref(bn->batCacheid); + BBPkeepref(bn); return MAL_SUCCEED;
--- a/gmean/gmean.c Thu Mar 24 18:37:39 2022 +0100 +++ b/gmean/gmean.c Fri Jun 30 13:11:38 2023 +0200 @@ -234,7 +234,7 @@ BBPunfix(s->batCacheid); *retval = bn->batCacheid; - BBPkeepref(bn->batCacheid); + BBPkeepref(bn); return MAL_SUCCEED; }
--- a/regexp/README.rst Thu Mar 24 18:37:39 2022 +0100 +++ b/regexp/README.rst Fri Jun 30 13:11:38 2023 +0200 @@ -418,7 +418,7 @@ if ((bn = BATdense(0, 0, 0)) == NULL) throw(MAL, "regexp.rematchselect", GDK_EXCEPTION); *ret = bn->batCacheid; - BBPkeepref(*ret); + BBPkeepref(bn); return MAL_SUCCEED; } @@ -596,7 +596,7 @@ .. code-block:: c *ret = bn->batCacheid; - BBPkeepref(*ret); + BBPkeepref(bn); return MAL_SUCCEED; Join
--- a/regexp/regexp.c Thu Mar 24 18:37:39 2022 +0100 +++ b/regexp/regexp.c Fri Jun 30 13:11:38 2023 +0200 @@ -133,7 +133,7 @@ if ((bn = BATconstant(b->hseqbase, TYPE_bit, &f, BATcount(b), TRANSIENT)) == NULL) throw(MAL, "batregexp.rematch", GDK_EXCEPTION); *ret = bn->batCacheid; - BBPkeepref(*ret); + BBPkeepref(bn); BBPunfix(b->batCacheid); return MAL_SUCCEED; } @@ -236,7 +236,7 @@ pcre_free(re); *ret = bn->batCacheid; - BBPkeepref(*ret); + BBPkeepref(bn); return MAL_SUCCEED; } @@ -277,7 +277,7 @@ if ((bn = BATdense(0, 0, 0)) == NULL) throw(MAL, "regexp.rematchselect", GDK_EXCEPTION); *ret = bn->batCacheid; - BBPkeepref(*ret); + BBPkeepref(bn); return MAL_SUCCEED; } options = parseflags(flags); @@ -305,14 +305,15 @@ throw(MAL, "regexp.rematchselect", RUNTIME_OBJECT_MISSING); } - if (canditer_init(&ci, b, s) == 0) { + canditer_init(&ci, b, s); + if (ci.ncand == 0) { /* trivially empty result */ BBPunfix(b->batCacheid); if (s) BBPunfix(s->batCacheid); bn = BATdense(0, 0, 0); *ret = bn->batCacheid; - BBPkeepref(*ret); + BBPkeepref(bn); return MAL_SUCCEED; } @@ -439,7 +440,7 @@ bn->tnonil = true; *ret = bn->batCacheid; - BBPkeepref(*ret); + BBPkeepref(bn); return MAL_SUCCEED; } @@ -532,8 +533,9 @@ throw(MAL, "regexp.rematchjoin", SEMANTIC_TYPE_MISMATCH); } - if (canditer_init(&lci, l, sl) == 0 || - canditer_init(&rci, r, sr) == 0) { + canditer_init(&lci, l, sl); + canditer_init(&rci, r, sr); + if (lci.ncand == 0 || rci.ncand == 0) { /* if either side is empty (or no candidates) the * result is empty */ BBPunfix(l->batCacheid); @@ -626,8 +628,8 @@ BBPunfix(sr->batCacheid); *lres = bn1->batCacheid; *rres = bn2->batCacheid; - BBPkeepref(*lres); - BBPkeepref(*rres); + BBPkeepref(bn1); + BBPkeepref(bn2); return MAL_SUCCEED; bailout: