Update of /cvsroot/monetdb/MonetDB5/src/modules/atoms
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32295/src/modules/atoms
Modified Files:
mtime.mx str.mx
Log Message:
Merged GDK-2 branch into development branch.
Current changes were mostly started for
fixing the void concurrency problem
As a side action, the bun/bat layout was also changed.
We now have a split head and tail. This means many of the well known
macros are changed (ie BUN{h,t}{loc,var} BUN{head,tail})
BAT iteration now needs a special struct
BATiter which can be correctly created as
BATiter bi = bat_iterator(b);
TODO
1 some modules aren't ported (maybe be dropped as they aren't used)
2 some more bugs to find
Next improvements which are now possible
views based on 2 bats
(or a bat where head is real and the tail a view (or vs))
many more....
For a presentation about the changes, see
http://www.cwi.nl/~niels/download/gdk2.pdf
Index: str.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/atoms/str.mx,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- str.mx 1 Jun 2007 09:21:39 -0000 1.67
+++ str.mx 4 Oct 2007 10:37:14 -0000 1.68
@@ -1371,9 +1371,9 @@
{
BUN UTF8_CONV_r;
int UTF8_CONV_v = (@1);
- HASHfnd_int(UTF8_CONV_r, [EMAIL PROTECTED], &UTF8_CONV_v);
- if (UTF8_CONV_r)
- (@1) = *(int*) BUNtloc([EMAIL PROTECTED], UTF8_CONV_r);
+ HASHfnd_int(UTF8_CONV_r, [EMAIL PROTECTED], &UTF8_CONV_v);
+ if (UTF8_CONV_r != BUN_NONE)
+ (@1) = *(int*) BUNtloc([EMAIL PROTECTED], UTF8_CONV_r);
}
@= UTF8_GETCHAR
if ([EMAIL PROTECTED] < 0x80) {
@@ -1810,6 +1810,7 @@
int
strLower(str *res, str s)
{
+ BATiter UTF8_tolowerBati = bat_iterator(UTF8_tolowerBat);
size_t len = strlen(s);
unsigned char *dst, *src = (unsigned char *) s, *end = (unsigned char
*) (src + len);
@@ -1838,6 +1839,7 @@
int
strUpper(str *res, str s)
{
+ BATiter UTF8_toupperBati = bat_iterator(UTF8_toupperBat);
size_t len = strlen(s);
unsigned char *dst, *src = (unsigned char *) s, *end = (unsigned char
*) (src + len);
Index: mtime.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/atoms/mtime.mx,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- mtime.mx 26 May 2007 10:30:28 -0000 1.98
+++ mtime.mx 4 Oct 2007 10:37:12 -0000 1.99
@@ -2952,10 +2952,11 @@
BUN p;
str s = *name;
- if (BUNfnd(timezones, s) == 0)
+ if (BUNfnd(timezones, s) == BUN_NONE)
s = "GMT";
- if ((p = BUNfnd(timezones, s)) != NULL){
- z = (tzone*)BUNtail(timezones,p);
+ if ((p = BUNfnd(timezones, s)) != BUN_NONE){
+ BATiter tzi = bat_iterator(timezones);
+ z = (tzone*)BUNtail(tzi,p);
tzone_set_local(z);
}
return MAL_SUCCEED;
@@ -3806,10 +3807,10 @@
@= Extract
str [EMAIL PROTECTED]@2_bulk(int *ret, int *bid)
{ BAT *b,*bn;
- int xx;
@3 v;
date d;
BUN p,q;
+ BATiter bi;
if( (b= BATdescriptor(*bid)) == NULL ){
throw(MAL, "[EMAIL PROTECTED]", "Cannot access descriptor");
@@ -3818,10 +3819,11 @@
bn= BATnew(BAThtype(b),[EMAIL PROTECTED], BATcount(b));
- BATloopFast(b,p,q,xx){
- d= *(date*) BUNtail(b,p);
+ bi = bat_iterator(b);
+ BATloop(b,p,q){
+ d= *(date*) BUNtail(bi,p);
[EMAIL PROTECTED]@2(&v,&d);
- BUNfastins(bn,BUNhead(b,p),&v);
+ BUNfastins(bn,BUNhead(bi,p),&v);
}
BBPkeepref(*ret = bn->batCacheid);
bn->tsorted = FALSE;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins