Changeset: 16aa72f89453 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=16aa72f89453
Modified Files:
monetdb5/modules/atoms/str.c
Branch: Nov2019
Log Message:
UTF8_strlen of a nil string is not 1, besides UTF8_strlen is never called for a
nil string
diffs (20 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
@@ -3108,14 +3108,12 @@ strEpilogue(void *ret)
// (1 + ((UC) > 0x7F) + ((UC) > 0x7FF) + ((UC) > 0xFFFF))
static inline size_t
-UTF8_strlen(const char *s)
+UTF8_strlen(const char *s) /* This function assumes, s is never nil */
{
size_t pos = 0;
UTF8_assert(s);
-
- if (GDK_STRNIL(s))
- return 1;
+ assert(!strNil(s));
while (*s) {
/* just count leading bytes of encoded code points; only works
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list