Update of /cvsroot/monetdb/MonetDB4/src/monet
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9066/src/monet

Modified Files:
        yytree.mx 
Log Message:
propagated changes of Wednesday Oct 03 2007 - Monday Oct 08 2007
from the MonetDB_4-20 branch to the development trunk


Index: yytree.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB4/src/monet/yytree.mx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- yytree.mx   25 Apr 2007 09:02:00 -0000      1.6
+++ yytree.mx   8 Oct 2007 09:21:38 -0000       1.7
@@ -143,7 +143,9 @@
                        GDKfatal("yyextend: out of memory.\n");
                }
                buf[0] = yy_buf; 
-               yy_free = sizeof(char*); /* first bytes are the backpointer */
+               yy_free = sizeof(lng); /* first bytes are the backpointer,
+                                         to keep lngs etc aligned 
+                                         we skip a full sizeof(lng) */
                yy_buf = (char*) buf;
        }
        t = (YYSTREE) (yy_buf + yy_free);
@@ -164,6 +166,7 @@
        }
        t = (YYSTREE) ((*next)  - off);
         YYNODE(t, tok, TYPE_void, off, nbytes, cap, malloced, extendable);
+       nbytes = (nbytes+7)&~7; /* round up to be 8 bytes aligned */
        *next += nbytes - off;
        return t;
 }
@@ -352,14 +355,18 @@
        }
        yy_buf = (char*) cur;
        yy_free = yy_backup;
-       yy_backup = sizeof(char*);
+       yy_backup = sizeof(lng); /* first bytes are the backpointer,
+                                 to keep lngs etc aligned 
+                                 we skip a full sizeof(lng) */
        yy_sync = NULL;
 }
 
 void 
 Myylogclean(void)
 {
-       yy_backup = sizeof(char*);
+       yy_backup = sizeof(lng); /* first bytes are the backpointer,
+                                 to keep lngs etc aligned 
+                                 we skip a full sizeof(lng) */
        yy_sync = NULL;
        Myylogpop();
 }


-------------------------------------------------------------------------
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

Reply via email to