Changeset: d4677f634571 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d4677f634571 Modified Files: monetdb5/modules/mal/txtsim.c Branch: Dec2023 Log Message:
windows compiler doesn't like the larger sized types. So lets do some (up)casting instead. diffs (23 lines): diff --git a/monetdb5/modules/mal/txtsim.c b/monetdb5/modules/mal/txtsim.c --- a/monetdb5/modules/mal/txtsim.c +++ b/monetdb5/modules/mal/txtsim.c @@ -65,8 +65,8 @@ dameraulevenshtein(int *res, str *S, str char *s = *S; char *t = *T; int *d; /* pointer to matrix */ - lng n; /* length of s */ - lng m; /* length of t */ + int n; /* length of s */ + int m; /* length of t */ int i; /* iterates through s */ int j; /* iterates through t */ char s_i; /* ith character of s */ @@ -95,7 +95,7 @@ dameraulevenshtein(int *res, str *S, str *res = n; return MAL_SUCCEED; } - sz = (n + 1) * (m + 1) * sizeof(int); + sz = (((lng)n) + 1) * (((lng)m) + 1) * sizeof(int); if (sz > (LL_CONSTANT(1)<<28)) throw(MAL, "dameraulevenshtein", SQLSTATE(HY013) MAL_MALLOC_FAIL); d = (int *) GDKmalloc((size_t)sz); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org