Changeset: 3df411b21c3f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3df411b21c3f Modified Files: gdk/gdk_bat.c gdk/gdk_private.h gdk/gdk_setop.c Branch: Oct2014 Log Message:
BATclone is used in one place only: move it to that file and make static. diffs (66 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -382,23 +382,6 @@ BATattach(int tt, const char *heapfile, } /* - * The routine BATclone creates a bat with the same types as b. - */ -BAT * -BATclone(BAT *b, BUN cap, int role) -{ - BAT *c = BATnew(b->htype, b->ttype, cap, role); - - if (c) { - if (c->htype == TYPE_void && b->hseqbase != oid_nil) - BATseqbase(c, b->hseqbase); - if (c->ttype == TYPE_void && b->tseqbase != oid_nil) - BATseqbase(BATmirror(c), b->tseqbase); - } - return c; -} - -/* * If the BAT runs out of storage for BUNS it will reallocate space. * For memory mapped BATs we simple extend the administration after * having an assurance that the BAT still can be safely stored away. diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h --- a/gdk/gdk_private.h +++ b/gdk/gdk_private.h @@ -62,8 +62,6 @@ str ATOMunknown_name(int a) __attribute__((__visibility__("hidden"))); int BATcheckmodes(BAT *b, int persistent) __attribute__((__visibility__("hidden"))); -BAT *BATclone(BAT *b, BUN capacity, int role) - __attribute__((__visibility__("hidden"))); BATstore *BATcreatedesc(int ht, int tt, int heapnames, int role) __attribute__((__visibility__("hidden"))); void BATdestroy(BATstore *bs) diff --git a/gdk/gdk_setop.c b/gdk/gdk_setop.c --- a/gdk/gdk_setop.c +++ b/gdk/gdk_setop.c @@ -430,6 +430,23 @@ batcheck(intersect) batcheck(diff) +/* + * The routine BATclone creates a bat with the same types as b. + */ +static BAT * +BATclone(BAT *b, BUN cap, int role) +{ + BAT *c = BATnew(b->htype, b->ttype, cap, role); + + if (c) { + if (c->htype == TYPE_void && b->hseqbase != oid_nil) + BATseqbase(c, b->hseqbase); + if (c->ttype == TYPE_void && b->tseqbase != oid_nil) + BATseqbase(BATmirror(c), b->tseqbase); + } + return c; +} + static BAT * diff_intersect(BAT *l, BAT *r, int diff) { _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list