Changeset: d50486b8585a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d50486b8585a
Modified Files:
        monetdb5/modules/kernel/bat5.c
        monetdb5/modules/kernel/bat5.h
Branch: default
Log Message:

Change param from generic pointer to pointer to oid.
Changeset ef4c925429d1 changed the MAL interface, here we change the C
interface.


diffs (165 lines):

diff --git a/monetdb5/modules/kernel/bat5.c b/monetdb5/modules/kernel/bat5.c
--- a/monetdb5/modules/kernel/bat5.c
+++ b/monetdb5/modules/kernel/bat5.c
@@ -580,7 +580,7 @@ BKCorder_rev(bat *r, const bat *bid)
 }
 
 char *
-BKCinsert_bun(bat *r, const bat *bid, const void *h, const void *t)
+BKCinsert_bun(bat *r, const bat *bid, const oid *h, const void *t)
 {
        BAT *b;
 
@@ -588,12 +588,6 @@ BKCinsert_bun(bat *r, const bat *bid, co
                throw(MAL, "bat.insert", RUNTIME_OBJECT_MISSING);
        if ((b = setaccess(b, BAT_WRITE)) == NULL)
                throw(MAL, "bat.insert", OPERATION_FAILED);
-       if (b->htype >= TYPE_str && ATOMstorage(b->htype) >= TYPE_str) {
-               if (h == 0 || *(str*)h == 0)
-                       h = (ptr) str_nil;
-               else
-                       h = (ptr) *(str *)h;
-       }
        if (b->ttype >= TYPE_str && ATOMstorage(b->ttype) >= TYPE_str) {
                if (t == 0 || *(str*)t == 0)
                        t = (ptr) str_nil;
@@ -609,7 +603,7 @@ BKCinsert_bun(bat *r, const bat *bid, co
 }
 
 char *
-BKCinsert_bun_force(bat *r, const bat *bid, const void *h, const void *t, 
const bit *force)
+BKCinsert_bun_force(bat *r, const bat *bid, const oid *h, const void *t, const 
bit *force)
 {
        BAT *b;
 
@@ -617,12 +611,6 @@ BKCinsert_bun_force(bat *r, const bat *b
                throw(MAL, "bat.insert", RUNTIME_OBJECT_MISSING);
        if ((b = setaccess(b, BAT_WRITE)) == NULL)
                throw(MAL, "bat.insert", OPERATION_FAILED);
-       if (b->htype >= TYPE_str && ATOMstorage(b->htype) >= TYPE_str) {
-               if (h == 0 || *(str*)h == 0)
-                       h = (ptr) str_nil;
-               else
-                       h = (ptr) *(str *)h;
-       }
        if (b->ttype >= TYPE_str && ATOMstorage(b->ttype) >= TYPE_str) {
                if (t == 0 || *(str*)t == 0)
                        t = (ptr) str_nil;
@@ -685,7 +673,7 @@ BKCinsert_bat_force(bat *r, const bat *b
 
 
 str
-BKCreplace_bun(bat *r, const bat *bid, const void *h, const void *t)
+BKCreplace_bun(bat *r, const bat *bid, const oid *h, const void *t)
 {
        BAT *b;
 
@@ -693,12 +681,6 @@ BKCreplace_bun(bat *r, const bat *bid, c
                throw(MAL, "bat.replace", RUNTIME_OBJECT_MISSING);
        if ((b = setaccess(b, BAT_WRITE)) == NULL)
                throw(MAL, "bat.replace", OPERATION_FAILED);
-       if (b->htype >= TYPE_str && ATOMstorage(b->htype) >= TYPE_str) {
-               if (h == 0 || *(str*)h == 0)
-                       h = (ptr) str_nil;
-               else
-                       h = (ptr) *(str *)h;
-       }
        if (b->ttype >= TYPE_str && ATOMstorage(b->ttype) >= TYPE_str) {
                if (t == 0 || *(str*)t == 0)
                        t = (ptr) str_nil;
@@ -738,7 +720,7 @@ BKCreplace_bat(bat *r, const bat *bid, c
 }
 
 str
-BKCreplace_bun_force(bat *r, const bat *bid, const void *h, const void *t, 
const bit *force)
+BKCreplace_bun_force(bat *r, const bat *bid, const oid *h, const void *t, 
const bit *force)
 {
        BAT *b;
 
@@ -746,12 +728,6 @@ BKCreplace_bun_force(bat *r, const bat *
                throw(MAL, "bat.replace", RUNTIME_OBJECT_MISSING);
        if ((b = setaccess(b, BAT_WRITE)) == NULL)
                throw(MAL, "bat.replace", OPERATION_FAILED);
-       if (b->htype >= TYPE_str && ATOMstorage(b->htype) >= TYPE_str) {
-               if (h == 0 || *(str*)h == 0)
-                       h = (ptr) str_nil;
-               else
-                       h = (ptr) *(str *)h;
-       }
        if (b->ttype >= TYPE_str && ATOMstorage(b->ttype) >= TYPE_str) {
                if (t == 0 || *(str*)t == 0)
                        t = (ptr) str_nil;
@@ -791,7 +767,7 @@ BKCreplace_bat_force(bat *r, const bat *
 }
 
 char *
-BKCdelete_bun(bat *r, const bat *bid, const void *h, const void *t)
+BKCdelete_bun(bat *r, const bat *bid, const oid *h, const void *t)
 {
        BAT *b;
 
@@ -799,12 +775,6 @@ BKCdelete_bun(bat *r, const bat *bid, co
                throw(MAL, "bat.delete_bun", RUNTIME_OBJECT_MISSING);
        if ((b = setaccess(b, BAT_WRITE)) == NULL)
                throw(MAL, "bat.delete_bun", OPERATION_FAILED);
-       if (b->htype >= TYPE_str && ATOMstorage(b->htype) >= TYPE_str) {
-               if (h == 0 || *(str*)h == 0)
-                       h = (ptr) str_nil;
-               else
-                       h = (ptr) *(str *)h;
-       }
        if (b->ttype >= TYPE_str && ATOMstorage(b->ttype) >= TYPE_str) {
                if (t == 0 || *(str*)t == 0)
                        t = (ptr) str_nil;
@@ -820,7 +790,7 @@ BKCdelete_bun(bat *r, const bat *bid, co
 }
 
 char *
-BKCdelete(bat *r, const bat *bid, const void *h)
+BKCdelete(bat *r, const bat *bid, const oid *h)
 {
        BAT *b;
 
@@ -828,12 +798,6 @@ BKCdelete(bat *r, const bat *bid, const 
                throw(MAL, "bat.delete", RUNTIME_OBJECT_MISSING);
        if ((b = setaccess(b, BAT_WRITE)) == NULL)
                throw(MAL, "bat.delete", OPERATION_FAILED);
-       if (b->htype >= TYPE_str && ATOMstorage(b->htype) >= TYPE_str) {
-               if (h == 0 || *(str*)h == 0)
-                       h = str_nil;
-               else
-                       h = *(str *)h;
-       }
        if (BUNdelHead(b, h, FALSE) == GDK_FAIL) {
                BBPunfix(b->batCacheid);
                throw(MAL, "bat.delete", GDK_EXCEPTION);
diff --git a/monetdb5/modules/kernel/bat5.h b/monetdb5/modules/kernel/bat5.h
--- a/monetdb5/modules/kernel/bat5.h
+++ b/monetdb5/modules/kernel/bat5.h
@@ -36,10 +36,10 @@
 bat5_export char *BKCsetRole(void *r, const bat *bid, const char * const 
*hname, const char * const *tname);
 bat5_export char *BKCgetAlpha(bat *r, const bat *bid);
 bat5_export char *BKCgetDelta(bat *r, const bat *bid);
-bat5_export char *BKCinsert_bun(bat *r, const bat *bid, const void *h, const 
void *t);
-bat5_export char *BKCinsert_bun_force(bat *r, const bat *bid, const void *h, 
const void *t, const bit *force);
-bat5_export char *BKCdelete(bat *r, const bat *bid, const void *h);
-bat5_export char *BKCdelete_bun(bat *r, const bat *bid, const void *h, const 
void *t);
+bat5_export char *BKCinsert_bun(bat *r, const bat *bid, const oid *h, const 
void *t);
+bat5_export char *BKCinsert_bun_force(bat *r, const bat *bid, const oid *h, 
const void *t, const bit *force);
+bat5_export char *BKCdelete(bat *r, const bat *bid, const oid *h);
+bat5_export char *BKCdelete_bun(bat *r, const bat *bid, const oid *h, const 
void *t);
 bat5_export str BKCnewBAT(bat *res, const int *ht, const int *tt, const BUN 
*cap, int role);
 bat5_export str BKCattach(bat *ret, const int *tt, const char * const 
*heapfile);
 bat5_export str BKCdensebat(bat *ret, const wrd *size);
@@ -50,9 +50,9 @@ bat5_export str BKCorder(bat *ret, const
 bat5_export str BKCorder_rev(bat *ret, const bat *bid);
 bat5_export str BKCinsert_bat(bat *r, const bat *bid, const bat *sid);
 bat5_export str BKCinsert_bat_force(bat *r, const bat *bid, const bat *sid, 
const bit *force);
-bat5_export str BKCreplace_bun(bat *r, const bat *bid, const void *h, const 
void *t);
+bat5_export str BKCreplace_bun(bat *r, const bat *bid, const oid *h, const 
void *t);
 bat5_export str BKCreplace_bat(bat *r, const bat *bid, const bat *sid);
-bat5_export str BKCreplace_bun_force(bat *r, const bat *bid, const void *h, 
const void *t, const bit *force);
+bat5_export str BKCreplace_bun_force(bat *r, const bat *bid, const oid *h, 
const void *t, const bit *force);
 bat5_export str BKCreplace_bat_force(bat *r, const bat *bid, const bat *sid, 
const bit *force);
 bat5_export str BKCdelete_all(bat *r, const bat *bid);
 bat5_export str BKCdelete_bat_bun(bat *r, const bat *bid, const bat *sid);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to