summaryrefslogtreecommitdiff
path: root/include/myisampack.h
diff options
context:
space:
mode:
authorhf@deer.(none) <>2004-06-02 19:11:57 +0500
committerhf@deer.(none) <>2004-06-02 19:11:57 +0500
commit7cf1d2596b0d01664d820cd22d315bf910d9d4d6 (patch)
tree064e7056ff39c52056305fbdbe15e034a750c7e9 /include/myisampack.h
parentf200b0fbf0594bc3f75dd93795722c499f1a0afb (diff)
downloadmariadb-git-7cf1d2596b0d01664d820cd22d315bf910d9d4d6.tar.gz
wl 1562 (To improve RTree indexes)
some changes to make code nicer
Diffstat (limited to 'include/myisampack.h')
-rw-r--r--include/myisampack.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/myisampack.h b/include/myisampack.h
index 95793e2aaeb..06c94fea75f 100644
--- a/include/myisampack.h
+++ b/include/myisampack.h
@@ -21,6 +21,10 @@
better compression
*/
+/* these two are for uniformity */
+#define mi_sint1korr(A) (int8)(*A)
+#define mi_uint1korr(A) (uint8)(*A)
+
#define mi_sint2korr(A) (int16) (((int16) ((uchar) (A)[1])) +\
((int16) ((int16) (A)[0]) << 8))
#define mi_sint3korr(A) ((int32) ((((uchar) (A)[0]) & 128) ? \
@@ -75,6 +79,9 @@
(((uint32) ((uchar) (A)[0])) << 24))) <<\
32))
+/* This one is for uniformity */
+#define mi_int1store(T,A) *((uchar*)(T))= (uchar) (A)
+
#define mi_int2store(T,A) { uint def_temp= (uint) (A) ;\
*((uchar*) ((T)+1))= (uchar)(def_temp); \
*((uchar*) ((T)+0))= (uchar)(def_temp >> 8); }