[Gridflow-cvs] [svn] commit: r5093 - in /trunk/src: gridflow.cxx gridflow.hxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Tue Mar 2 02:39:14 EST 2010


Author: matju
Date: Tue Mar  2 02:39:14 2010
New Revision: 5093

Log:
remove make_hocus_pocus. i hope this works well.

Modified:
    trunk/src/gridflow.cxx
    trunk/src/gridflow.hxx

Modified: trunk/src/gridflow.cxx
==============================================================================
--- trunk/src/gridflow.cxx (original)
+++ trunk/src/gridflow.cxx Tue Mar  2 02:39:14 2010
@@ -514,31 +514,14 @@
 
 bool BitPacking::is_le() {return endian==1 || (endian ^ ::is_le())==3;}
 
+/*
 #undef TRACE
 #ifdef DEBUG
 #define TRACE static int use=0; use++; if ((use%10000)==0) post_BitPacking(this);
 #else
 #define TRACE
 #endif
-#define FOO(A) case A##_e:   packer->as_##A(this,n,(A *)in,out); break;
-template <class T> void BitPacking::  pack(long n, T *in, uint8 *out) {TRACE
-	switch (NumberTypeE_type_of( in)) {FOO(uint8) FOO(int16) FOO(int32) default: RAISE("argh");}}
-#undef FOO
-#define FOO(A) case A##_e: unpacker->as_##A(this,n,in,(A *)out); break;
-template <class T> void BitPacking::unpack(long n, uint8 *in, T *out) {TRACE
-	switch (NumberTypeE_type_of(out)) {FOO(uint8) FOO(int16) FOO(int32) default: RAISE("argh");}}
-#undef FOO
-
-// i'm sorry... see the end of grid.c for an explanation...
-//static
-void make_hocus_pocus () {
-//	exit(1);
-#define FOO(S) \
-	((BitPacking*)0)->  pack(0,(S *)0,(uint8 *)0); \
-	((BitPacking*)0)->unpack(0,(uint8 *)0,(S *)0);
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
-}
+*/
 
 #ifdef __WIN32__
 #define lstat stat

Modified: trunk/src/gridflow.hxx
==============================================================================
--- trunk/src/gridflow.hxx (original)
+++ trunk/src/gridflow.hxx Tue Mar  2 02:39:14 2010
@@ -67,7 +67,7 @@
 #define A_LIST    t_atomtype(13) /* (t_binbuf *) */
 #endif
 #define A_GRID    t_atomtype(14) /* (Grid *)    */
-#define A_GRIDOUT t_atomtype(15) /* (GridOut *) */
+#define A_GRIDOUT t_atomtype(15) /* (GridOutlet *) */
 // the use of w_gpointer here is fake, just because there's no suitable member in the union
 struct Grid;
 struct GridOutlet;
@@ -455,8 +455,14 @@
 	bool is_le();
 	bool eq(BitPacking *o);
 // main entrances to Packers/Unpackers
-	template <class T> void   pack(long n, T *in, uint8 *out);
-	template <class T> void unpack(long n, uint8 *in, T *out);
+	#define FOO(A) case A##_e:   packer->as_##A(this,n,(A *)in,out); break;
+	template <class T> void   pack(long n, T *in, uint8 *out) {
+		switch (NumberTypeE_type_of( in)) {FOO(uint8) FOO(int16) FOO(int32) default: RAISE("argh");}}
+	#undef FOO
+	#define FOO(A) case A##_e: unpacker->as_##A(this,n,in,(A *)out); break;
+	template <class T> void unpack(long n, uint8 *in, T *out) {
+		switch (NumberTypeE_type_of(out)) {FOO(uint8) FOO(int16) FOO(int32) default: RAISE("argh");}}
+	#undef FOO
 };
 
 int high_bit(uint32 n);



More information about the Gridflow-cvs mailing list