Changeset: cb95b22e0f7e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/cb95b22e0f7e
Modified Files:
        clients/Tests/MAL-signatures-hge.test
        clients/Tests/MAL-signatures.test
        gdk/gdk_bbp.c
        gdk/gdk_logger.c
        monetdb5/ChangeLog
        monetdb5/modules/mal/pcre.c
Branch: default
Log Message:

Removed atom type "pcre".


diffs (108 lines):

diff --git a/clients/Tests/MAL-signatures-hge.test 
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -48189,11 +48189,6 @@ command pcre.imatch(X_0:str, X_1:str):bi
 PCREimatch
 Caseless Perl Compatible Regular Expression pattern matching against a string
 pcre
-index
-command pcre.index(X_0:pcre, X_1:str):int
-PCREindex
-match a pattern, return matched position (or 0 when not found)
-pcre
 match
 command pcre.match(X_0:str, X_1:str):bit
 PCREmatch
diff --git a/clients/Tests/MAL-signatures.test 
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -36669,11 +36669,6 @@ command pcre.imatch(X_0:str, X_1:str):bi
 PCREimatch
 Caseless Perl Compatible Regular Expression pattern matching against a string
 pcre
-index
-command pcre.index(X_0:pcre, X_1:str):int
-PCREindex
-match a pattern, return matched position (or 0 when not found)
-pcre
 match
 command pcre.match(X_0:str, X_1:str):bit
 PCREmatch
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -503,6 +503,10 @@ heapinit(BAT *b, const char *buf,
                TRC_CRITICAL(GDK, "type wkba (SQL name: GeometryA) has been 
removed\n");
                return -1;
        }
+       if (strcmp(type, "pcre") == 0) {
+               TRC_CRITICAL(GDK, "type pcre has been removed\n");
+               return -1;
+       }
 #ifdef HAVE_GEOM
 #if GDKLIBRARY <= 061050U
        if (strcmp(type, "wkb") == 0) {
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -1207,6 +1207,10 @@ log_read_types_file(logger *lg, FILE *fp
                        *needsnew = true;
                        continue;
                }
+               if (version < 52306 && strcmp(atom_name, "pcre") == 0) {
+                       *needsnew = true;
+                       continue;
+               }
                int i = ATOMindex(atom_name);
 
                if (id < -127 || id > 127 || i < 0) {
diff --git a/monetdb5/ChangeLog b/monetdb5/ChangeLog
--- a/monetdb5/ChangeLog
+++ b/monetdb5/ChangeLog
@@ -1,3 +1,8 @@
 # ChangeLog file for MonetDB5
 # This file is updated with Maddlog
 
+* Mon Aug  4 2025 Sjoerd Mullender <[email protected]>
+- The type "pcre" has been removed.  There was no way to create a value of
+  the type, and there was only one function that used a value of the type.
+  That function (pcre.index) has also been removed.
+
diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c
--- a/monetdb5/modules/mal/pcre.c
+++ b/monetdb5/modules/mal/pcre.c
@@ -840,16 +840,6 @@ PCREimatch(bit *ret, const char *const *
        return pcre_match_with_flags(ret, *val, *pat, "i");
 }
 
-typedef void *pcre;                            /* to be removed, together with 
the pcre atom */
-static str
-PCREindex(int *res, const pcre *pattern, const char *const *s)
-{
-       (void) res;
-       (void) pattern;
-       (void) s;
-       throw(MAL, "pcre.index", "This function is deprecated.");
-}
-
 static str
 PCREpatindex(int *ret, const char *const *pat, const char *const *val)
 {
@@ -1806,11 +1796,7 @@ LIKEjoin1(bat *r1, const bat *lid, const
 }
 
 #include "mel.h"
-mel_atom pcre_init_atoms[] = {
- { .name="pcre", },  { .cmp=NULL }
-};
 mel_func pcre_init_funcs[] = {
- command("pcre", "index", PCREindex, false, "match a pattern, return matched 
position (or 0 when not found)", args(1,3, 
arg("",int),arg("pat",pcre),arg("s",str))),
  command("pcre", "match", PCREmatch, false, "Perl Compatible Regular 
Expression pattern matching against a string", args(1,3, 
arg("",bit),arg("s",str),arg("pat",str))),
  command("pcre", "imatch", PCREimatch, false, "Caseless Perl Compatible 
Regular Expression pattern matching against a string", args(1,3, 
arg("",bit),arg("s",str),arg("pat",str))),
  command("pcre", "patindex", PCREpatindex, false, "Location of the first POSIX 
pattern matching against a string", args(1,3, 
arg("",int),arg("pat",str),arg("s",str))),
@@ -1840,4 +1826,4 @@ mel_func pcre_init_funcs[] = {
 #pragma section(".CRT$XCU",read)
 #endif
 LIB_STARTUP_FUNC(init_pcre_mal)
-{ mal_module("pcre", pcre_init_atoms, pcre_init_funcs); }
+{ mal_module("pcre", NULL, pcre_init_funcs); }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to