Changeset: 11d565d33418 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/11d565d33418
Modified Files:
monetdb5/modules/atoms/bigram.h
monetdb5/modules/atoms/str.c
monetdb5/modules/atoms/str.h
monetdb5/modules/mal/txtsim.c
Branch: strimps_v3
Log Message:
Address compilation issues
diffs (102 lines):
diff --git a/monetdb5/modules/atoms/bigram.h b/monetdb5/modules/atoms/bigram.h
--- a/monetdb5/modules/atoms/bigram.h
+++ b/monetdb5/modules/atoms/bigram.h
@@ -41,11 +41,6 @@
#define ENC_TOKEN1(t) CHARMAP(*t)
#define ENC_TOKEN2(t) CHARMAP(*(t + 1))
-#undef VALUE
-#undef APPEND
-#define VALUE(s, x) (s##vars + VarHeapVal(s##vals, (x), s##i->width))
-#define APPEND(b, o) (((oid *) b->theap->base)[b->batCount++] = (o))
-
typedef struct {
NGRAM_TYPE *idx;
NGRAM_TYPE *sigs;
@@ -106,7 +101,7 @@ init_bigram_idx(Ngrams *ng, BATiter *bi,
}
oid bbase = bi->b->hseqbase, ob;
- const char *bvars = bi->vh->base, *bvals = bi->base;
+ const char *b_vars = bi->vh->base, *b_vals = bi->base;
canditer_reset(bci);
TIMEOUT_LOOP(bci->ncand, qry_ctx) {
@@ -117,7 +112,7 @@ init_bigram_idx(Ngrams *ng, BATiter *bi,
h_tmp[ENC_TOKEN1(s)][ENC_TOKEN2(s)]++;
}
- for (size_t i = 0; i < BIGRAM_SZ; i++) {
+ for (unsigned i = 0; i < BIGRAM_SZ; i++) {
map[i] = i;
idx[i] = lists[i] = 0;
h[i] = h_tmp_ptr[i];
@@ -277,8 +272,8 @@ bigram_strjoin(BAT *rl, BAT *rr, BATiter
}
oid lbase = li->b->hseqbase, rbase = ri->b->hseqbase, or, ol;
- const char *lvars = li->vh->base, *rvars = ri->vh->base,
- *lvals = li->base, *rvals = ri->base;
+ const char *l_vars = li->vh->base, *r_vars = ri->vh->base,
+ *l_vals = li->base, *r_vals = ri->base;
lng t0 = 0;
TRC_DEBUG_IF(ALGO) t0 = GDKusec();
@@ -374,7 +369,7 @@ bigram_strjoin(BAT *rl, BAT *rr, BATiter
ngrams_destroy(ng);
- TRC_DEBUG(ALGO, "(%s, %s, l=%s #%zu [%s], r=%s #%zu [%s], cl=%s #%zu,
cr=%s #%zu, time=%ld)\n",
+ TRC_DEBUG(ALGO, "(%s, %s, l=%s #%zu [%s], r=%s #%zu [%s], cl=%s #%zu,
cr=%s #%zu, time="LLFMT"usecs)\n",
fname, "bigram_strjoin",
BATgetId(li->b), li->count, ATOMname(li->b->ttype),
BATgetId(ri->b), ri->count, ATOMname(ri->b->ttype),
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
@@ -2008,11 +2008,6 @@ STRcontainsselect(Client cntxt, MalBlkPt
str_icontains, str_contains,
"str.containsselect");
}
-#undef VALUE
-#undef APPEND
-#define VALUE(s, x) (s##_vars + VarHeapVal(s##_vals, (x), s##i->width))
-#define APPEND(b, o) (((oid *) b->theap->base)[b->batCount++] = (o))
-
static void
do_strrev(char *dst, const char *src, size_t len)
{
@@ -2278,7 +2273,7 @@ sorted_strjoin(BAT **rl_ptr, BAT **rr_pt
}
oid sorted_l_base = sorted_l->hseqbase, sorted_r_base =
sorted_r->hseqbase,
- ol, or, ly = 0, rx = 0, n;
+ ol = 0, or = 0, ly = 0, rx = 0, n;
const char *sorted_l_vars = sorted_li->vh->base, *sorted_r_vars =
sorted_ri->vh->base,
*sorted_l_vals = sorted_li->base, *sorted_r_vals =
sorted_ri->base;
size_t new_cap;
diff --git a/monetdb5/modules/atoms/str.h b/monetdb5/modules/atoms/str.h
--- a/monetdb5/modules/atoms/str.h
+++ b/monetdb5/modules/atoms/str.h
@@ -140,6 +140,9 @@
} \
} while (0)
+#define VALUE(s, x) (s##_vars + VarHeapVal(s##_vals, (x), s##i->width))
+#define APPEND(b, o) (((oid *) b->theap->base)[b->batCount++] = (o))
+
mal_export bool batstr_func_has_candidates(const char *func);
mal_export int UTF8_strwidth(const char *s);
mal_export int UTF8_strlen(const char *s);
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
@@ -658,6 +658,8 @@ TXTSIMminjarowinkler(bit *res, const cha
return MAL_SUCCEED;
}
+#undef VALUE
+#undef APPEND
#define VALUE(s, x) (s##vars + VarHeapVal(s##vals, (x), s##width))
#define APPEND(b, o) (((oid *) b->theap->base)[b->batCount++] = (o))
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]