Update of /cvsroot/monetdb/MonetDB5/src/modules/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17535/src/modules/mal
Modified Files:
pcre.mx
Log Message:
unaligned memory fixes
Index: pcre.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/pcre.mx,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- pcre.mx 4 Oct 2007 10:37:35 -0000 1.50
+++ pcre.mx 14 Nov 2007 22:04:56 -0000 1.51
@@ -246,23 +246,24 @@
#else
#include <pcre.h>
-#define m2p(p) (pcre*)(((sht*)p)+1)
-#define p2m(p) (pcre*)(((sht*)p)-1)
+
+#define m2p(p) (pcre*)(((size_t*)p)+1)
+#define p2m(p) (pcre*)(((size_t*)p)-1)
void *
my_pcre_malloc(size_t s)
{
- char *r = GDKmalloc(s + sizeof(sht));
- sht *sz = (sht *) r;
+ char *r = GDKmalloc(s + sizeof(size_t));
+ size_t *sz = (size_t *) r;
- *sz = s + sizeof(sht);
+ *sz = s + sizeof(size_t);
return (void *) (sz + 1);
}
void
my_pcre_free(void *blk)
{
- sht *sz = (sht *) blk;
+ size_t *sz = (size_t *) blk;
sz -= 1;
GDKfree((void *) sz);
@@ -720,7 +721,7 @@
HEAP_free(h, *idx);
}
-#define pcresize(val) ((sht*)val)[0]
+#define pcresize(val) ((size_t*)val)[0]
var_t
pcre_put(Heap *h, var_t *bun, pcre * val)
-------------------------------------------------------------------------
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