Changeset: 34e74e88d2fa for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=34e74e88d2fa
Modified Files:
        geom/monetdb5/geom.c
        geom/monetdb5/geomBulk.c
Branch: geo
Log Message:

replaced BBPreleaseref with BBPunfix


diffs (truncated from 984 to 300 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -2871,7 +2871,7 @@ str wkbMakeLineAggr(wkb** outWKB, int* i
 
        //check if the BATs are dense and aligned
        if( !BAThdense(inBAT) ) {
-               BBPreleaseref(inBAT->batCacheid);       
+               BBPunfix(inBAT->batCacheid);    
                return createException(MAL, "geom.MakeLine", "BATs must have 
dense heads");
        }
 
@@ -2888,7 +2888,7 @@ str wkbMakeLineAggr(wkb** outWKB, int* i
                if ((err = wkbMakeLine(outWKB, &aWKB, &bWKB)) != MAL_SUCCEED) {
                        str msg = createException(MAL, "geom.MakeLine", "%s", 
err);
 
-                       BBPreleaseref(inBAT->batCacheid);       
+                       BBPunfix(inBAT->batCacheid);    
 
                        GDKfree(err);
                        return msg;
@@ -2905,14 +2905,14 @@ str wkbMakeLineAggr(wkb** outWKB, int* i
                if ((err = wkbMakeLine(outWKB, &bWKB, &aWKB)) != MAL_SUCCEED) {
                        str msg = createException(MAL, "geom.MakeLine", "%s", 
err);
                
-                       BBPreleaseref(inBAT->batCacheid);       
+                       BBPunfix(inBAT->batCacheid);    
                        GDKfree(err);
                        GDKfree(bWKB);          
                        return msg;
                }
        }
 
-       BBPreleaseref(inBAT->batCacheid);       
+       BBPunfix(inBAT->batCacheid);    
 
        return MAL_SUCCEED;
 }
@@ -3765,7 +3765,7 @@ str wkbUnionAggr(wkb** outWKB, int* inBA
 
        //check if the BATs are dense and aligned
        if( !BAThdense(inBAT) ) {
-               BBPreleaseref(inBAT->batCacheid);       
+               BBPunfix(inBAT->batCacheid);    
                return createException(MAL, "geom.Union", "BATs must have dense 
heads");
        }
 
@@ -3782,7 +3782,7 @@ str wkbUnionAggr(wkb** outWKB, int* inBA
                if ((err = wkbUnion(outWKB, &aWKB, &bWKB)) != MAL_SUCCEED) {
                        str msg = createException(MAL, "geom.Union", "%s", err);
 
-                       BBPreleaseref(inBAT->batCacheid);       
+                       BBPunfix(inBAT->batCacheid);    
 
                        GDKfree(err);
                        return msg;
@@ -3799,14 +3799,14 @@ str wkbUnionAggr(wkb** outWKB, int* inBA
                if ((err = wkbUnion(outWKB, &bWKB, &aWKB)) != MAL_SUCCEED) {
                        str msg = createException(MAL, "geom.Union", "%s", err);
                
-                       BBPreleaseref(inBAT->batCacheid);       
+                       BBPunfix(inBAT->batCacheid);    
                        GDKfree(err);
                        GDKfree(bWKB);          
                        return msg;
                }
        }
 
-       BBPreleaseref(inBAT->batCacheid);       
+       BBPunfix(inBAT->batCacheid);    
 
        return MAL_SUCCEED;
 
diff --git a/geom/monetdb5/geomBulk.c b/geom/monetdb5/geomBulk.c
--- a/geom/monetdb5/geomBulk.c
+++ b/geom/monetdb5/geomBulk.c
@@ -39,13 +39,13 @@ str geom_2_geom_bat(int* outBAT_id, int*
        }
        
        if ( inBAT->htype != TYPE_void ) { //header type of  BAT not void
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, "batcalc.wkb", "the arguments must have dense and 
aligned heads");
        }
 
        //create a new BAT
        if ((outBAT = BATnew(TYPE_void, ATOMindex("wkb"), BATcount(inBAT), 
TRANSIENT)) == NULL) {
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, "batcalc.wkb", MAL_MALLOC_FAIL);
        }
        //set the first idx of the new BAT equal to that of the input BAT
@@ -61,8 +61,8 @@ str geom_2_geom_bat(int* outBAT_id, int*
                inWKB = (wkb*) BUNtail(inBAT_iter, p);
                if ((err = geom_2_geom(&outWKB, &inWKB, columnType, 
columnSRID)) != MAL_SUCCEED) { //check type
                        str msg;
-                       BBPreleaseref(inBAT->batCacheid);
-                       BBPreleaseref(outBAT->batCacheid);
+                       BBPunfix(inBAT->batCacheid);
+                       BBPunfix(outBAT->batCacheid);
                        msg = createException(MAL, "batcalc.wkb", "%s", err);
                        GDKfree(err);
                        return msg;
@@ -76,7 +76,7 @@ str geom_2_geom_bat(int* outBAT_id, int*
        BATsetcount(outBAT, BATcount(inBAT));
        BATsettrivprop(outBAT);
        BATderiveProps(outBAT,FALSE);
-       BBPreleaseref(inBAT->batCacheid);
+       BBPunfix(inBAT->batCacheid);
        BBPkeepref(*outBAT_id = outBAT->batCacheid);
        return MAL_SUCCEED;
 
@@ -95,13 +95,13 @@ str wkbFromText_bat(bat *outBAT_id, bat 
        }
        
        if ( inBAT->htype != TYPE_void ) { //header type of  BAT not void
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, "batgeom.wkbFromText", "the arguments must have 
dense and aligned heads");
        }
 
        //create a new for the output BAT
        if ((outBAT = BATnew(TYPE_void, ATOMindex("wkb"), BATcount(inBAT), 
TRANSIENT)) == NULL) {
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, "batgeom.wkbFromText", MAL_MALLOC_FAIL);
        }
        //set the first idx of the new BAT equal to that of the input BAT
@@ -118,8 +118,8 @@ str wkbFromText_bat(bat *outBAT_id, bat 
                        str msg = createException(MAL, "batgeom.wkbFromText", 
"%s", err);
                        GDKfree(err);
 
-                       BBPreleaseref(inBAT->batCacheid);
-                       BBPreleaseref(outBAT->batCacheid);
+                       BBPunfix(inBAT->batCacheid);
+                       BBPunfix(outBAT->batCacheid);
                        
                        return msg;
                }
@@ -131,7 +131,7 @@ str wkbFromText_bat(bat *outBAT_id, bat 
        //set the number of elements in the outBAT
        BATsetcount(outBAT, BATcount(inBAT));
        
-       BBPreleaseref(inBAT->batCacheid);
+       BBPunfix(inBAT->batCacheid);
        BBPkeepref(*outBAT_id = outBAT->batCacheid);
        
        return MAL_SUCCEED;
@@ -153,13 +153,13 @@ str wkbCoordinateFromMBR_bat(int *outBAT
        }
        
        if ( inBAT->htype != TYPE_void ) { //header type of  BAT not void
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, "batgeom.coordinateFromMBR", "the arguments must 
have dense and aligned heads");
        }
 
        //create a new BAT for the output
        if ((outBAT = BATnew(TYPE_void, ATOMindex("dbl"), BATcount(inBAT), 
TRANSIENT)) == NULL) {
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, "batgeom.coordinateFromMBR", MAL_MALLOC_FAIL);
        }
        //set the first idx of the new BAT equal to that of the input BAT
@@ -173,8 +173,8 @@ str wkbCoordinateFromMBR_bat(int *outBAT
                inMBR = (mbr*) BUNtail(inBAT_iter, p);
                if ((err = wkbCoordinateFromMBR(&outDbl, &inMBR, 
coordinateIdx)) != MAL_SUCCEED) {
                        str msg;
-                       BBPreleaseref(inBAT->batCacheid);
-                       BBPreleaseref(outBAT->batCacheid);
+                       BBPunfix(inBAT->batCacheid);
+                       BBPunfix(outBAT->batCacheid);
                        msg = createException(MAL, "batgeom.coordinateFromMBR", 
"%s", err);
                        GDKfree(err);
                        return msg;
@@ -186,7 +186,7 @@ str wkbCoordinateFromMBR_bat(int *outBAT
        BATsetcount(outBAT, BATcount(inBAT));
     BATsettrivprop(outBAT);
     BATderiveProps(outBAT,FALSE);
-       BBPreleaseref(inBAT->batCacheid);
+       BBPunfix(inBAT->batCacheid);
        BBPkeepref(*outBAT_id = outBAT->batCacheid);
        return MAL_SUCCEED;
 
@@ -207,13 +207,13 @@ static str WKBtoSTRflagINT_bat(bat *outB
        }
        
        if ( inBAT->htype != TYPE_void ) { //header type of  BAT not void
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, name, "the arguments must have dense and aligned 
heads");
        }
 
        //create a new for the output BAT
        if ((outBAT = BATnew(TYPE_void, ATOMindex("str"), BATcount(inBAT), 
TRANSIENT)) == NULL) {
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, name, MAL_MALLOC_FAIL);
        }
        //set the first idx of the new BAT equal to that of the input BAT
@@ -230,8 +230,8 @@ static str WKBtoSTRflagINT_bat(bat *outB
                        str msg = createException(MAL, name, "%s", err);
                        GDKfree(err);
 
-                       BBPreleaseref(inBAT->batCacheid);
-                       BBPreleaseref(outBAT->batCacheid);
+                       BBPunfix(inBAT->batCacheid);
+                       BBPunfix(outBAT->batCacheid);
                        
                        return msg;
                }
@@ -243,7 +243,7 @@ static str WKBtoSTRflagINT_bat(bat *outB
        //set the number of elements in the outBAT
        BATsetcount(outBAT, BATcount(inBAT));
        
-       BBPreleaseref(inBAT->batCacheid);
+       BBPunfix(inBAT->batCacheid);
        BBPkeepref(*outBAT_id = outBAT->batCacheid);
        
        return MAL_SUCCEED;
@@ -273,13 +273,13 @@ static str WKBtoWKB_bat(bat *outBAT_id, 
        }
        
        if ( inBAT->htype != TYPE_void ) { //header type of  BAT not void
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, name, "The arguments must have dense and aligned 
heads");
        }
 
        //create a new for the output BAT
        if ((outBAT = BATnew(TYPE_void, ATOMindex("wkb"), BATcount(inBAT), 
TRANSIENT)) == NULL) {
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, name, MAL_MALLOC_FAIL);
        }
        //set the first idx of the new BAT equal to that of the input BAT
@@ -296,8 +296,8 @@ static str WKBtoWKB_bat(bat *outBAT_id, 
                        str msg = createException(MAL, name, "%s", err);
                        GDKfree(err);
 
-                       BBPreleaseref(inBAT->batCacheid);
-                       BBPreleaseref(outBAT->batCacheid);
+                       BBPunfix(inBAT->batCacheid);
+                       BBPunfix(outBAT->batCacheid);
                        
                        return msg;
                }
@@ -309,7 +309,7 @@ static str WKBtoWKB_bat(bat *outBAT_id, 
        //set the number of elements in the outBAT
        BATsetcount(outBAT, BATcount(inBAT));
        
-       BBPreleaseref(inBAT->batCacheid);
+       BBPunfix(inBAT->batCacheid);
        BBPkeepref(*outBAT_id = outBAT->batCacheid);
        
        return MAL_SUCCEED;
@@ -336,13 +336,13 @@ static str WKBtoWKBflagINT_bat(bat *outB
        }
        
        if ( inBAT->htype != TYPE_void ) { //header type of  BAT not void
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, name, "The arguments must have dense and aligned 
heads");
        }
 
        //create a new for the output BAT
        if ((outBAT = BATnew(TYPE_void, ATOMindex("wkb"), BATcount(inBAT), 
TRANSIENT)) == NULL) {
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, name, MAL_MALLOC_FAIL);
        }
        //set the first idx of the new BAT equal to that of the input BAT
@@ -359,8 +359,8 @@ static str WKBtoWKBflagINT_bat(bat *outB
                        str msg = createException(MAL, name, "%s", err);
                        GDKfree(err);
 
-                       BBPreleaseref(inBAT->batCacheid);
-                       BBPreleaseref(outBAT->batCacheid);
+                       BBPunfix(inBAT->batCacheid);
+                       BBPunfix(outBAT->batCacheid);
                        
                        return msg;
                }
@@ -372,7 +372,7 @@ static str WKBtoWKBflagINT_bat(bat *outB
        //set the number of elements in the outBAT
        BATsetcount(outBAT, BATcount(inBAT));
        
-       BBPreleaseref(inBAT->batCacheid);
+       BBPunfix(inBAT->batCacheid);
        BBPkeepref(*outBAT_id = outBAT->batCacheid);
        
        return MAL_SUCCEED;
@@ -398,13 +398,13 @@ static str WKBtoBIT_bat(bat *outBAT_id, 
        }
        
        if ( inBAT->htype != TYPE_void ) { //header type of  BAT not void
-               BBPreleaseref(inBAT->batCacheid);
+               BBPunfix(inBAT->batCacheid);
                throw(MAL, name, "The arguments must have dense and aligned 
heads");
        }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to