Update of /cvsroot/monetdb/MonetDB/src/gdk
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32641

Modified Files:
        gdk_scanselect.mx 
Log Message:
fixed bug in handling fix types. This wasn't noticed as we have optimized this
general case away on normal builds. THis fixes the problems with noexpand=all.


Index: gdk_scanselect.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_scanselect.mx,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- gdk_scanselect.mx   4 Oct 2007 10:33:42 -0000       1.45
+++ gdk_scanselect.mx   9 Jan 2008 15:12:04 -0000       1.46
@@ -189,7 +189,7 @@
 #define ATOM_PUT_LNG(tpe,hp,dst,p,src)
 #endif
 
-#define FIXEDATOM_PUT(tpe,hp,dst,p,src)                                        
\
+#define FIXEDATOM_PUT(sh,tpe,hp,dst,p,src)                             \
        ATOM_PUT_CHR(tpe,hp,dst,p,src)                                  \
        ATOM_PUT_SHT(tpe,hp,dst,p,src)                                  \
        ATOM_PUT_INT(tpe,hp,dst,p,src)                                  \
@@ -198,11 +198,10 @@
                BBPincref(*(bat*) src, TRUE);                           \
                ((bat*) dst)[p] = *(bat*) src;                          \
        } else {                                                        \
-               /* TODO needs atom shift */                     \
-               memcpy(dst+p, src, (size_t) ATOMsize(tpe));     \
+               memcpy(dst+(p<<sh), src, (size_t) ATOMsize(tpe));       \
        }                                                               
 
-#define VARATOM_PUT(tpe,hp,dst,p,src)                                  \
+#define VARATOM_PUT(sh,tpe,hp,dst,p,src)                                       
\
        if (tpe == TYPE_str) {                                          \
                if (strPut(hp, ((var_t*) dst)+(p), (str) (src)) == 0) { \
                                goto bunins_failed;                     \
@@ -210,7 +209,7 @@
        }
 
 @-
-#define VARATOM_PUT(tpe,hp,dst,p,src)                                  \
+#define VARATOM_PUT(sh,tpe,hp,dst,p,src)                                       
\
        if (tpe == TYPE_str) {                                          \
                if (strPut(hp, ((var_t*) dst)+p, (str) src) == 0) {     \
                                goto bunins_failed;                     \
@@ -224,8 +223,8 @@
                ATOMfix(tpe, src);                                      \
        }
 @h
-#define SIMPLE_PUT(tpe,hp,dst,p,src) { ((tpe*)(dst))[p] = *(tpe*) (ptr) (src); 
}
-#define VOID_PUT(tpe,hp,dst,p,src)   {}
+#define SIMPLE_PUT(sh,tpe,hp,dst,p,src) { ((tpe*)(dst))[p] = *(tpe*) (ptr) 
(src); }
+#define VOID_PUT(sh,tpe,hp,dst,p,src)   {}
 
 @-
 Type-specific
@@ -238,8 +237,8 @@
 @= T_BUNfastins
 #define @[EMAIL PROTECTED](b, p, h, t)         \
        do {                                                    \
-               @2_PUT(@3, (b)->H->vheap, (b)->H->heap.base, p, h);     \
-               @5_PUT(@6, (b)->T->vheap, (b)->T->heap.base, p, t);     \
+               @2_PUT(b->H->shift, @3, (b)->H->vheap, (b)->H->heap.base, p, 
h);        \
+               @5_PUT(b->T->shift, @6, (b)->T->vheap, (b)->T->heap.base, p, 
t);        \
        } while (0)
 #define @[EMAIL PROTECTED](b, p, h, t, hs, ts)         \
        do {                                                    \


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to