[Gridflow-cvs] [svn] commit: r3405 - in /trunk: base/grid.h rubyext.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Wed Apr 2 17:15:04 EDT 2008


Author: matju
Date: Wed Apr  2 17:15:03 2008
New Revision: 3405

Log:
remove macro IS_BRIDGE

Modified:
    trunk/base/grid.h
    trunk/rubyext.c

Modified: trunk/base/grid.h
==============================================================================
--- trunk/base/grid.h (original)
+++ trunk/base/grid.h Wed Apr  2 17:15:03 2008
@@ -27,7 +27,6 @@
 
 #define GF_VERSION "0.9.1"
 
-#ifndef IS_BRIDGE
 #include <stdio.h>
 extern "C" void *gfmalloc(size_t n);
 extern "C" void gffree(void *p);
@@ -45,7 +44,6 @@
 ALLOCPREFIX void operator delete[](void*p) throw() {gffree(p);}
 ALLOCPREFIX void operator delete  (void*p, const std::nothrow_t&) throw() {gffree(p);}
 ALLOCPREFIX void operator delete[](void*p, const std::nothrow_t&) throw() {gffree(p);}
-#endif
 
 #ifdef USE_RUBY
 extern "C" {
@@ -70,12 +68,7 @@
 //#define _L_ post("%s:%d in %s",__FILE__,__LINE__,__PRETTY_FUNCTION__);
 #define _L_ fprintf(stderr,"%s:%d in %s\n",__FILE__,__LINE__,__PRETTY_FUNCTION__);
 
-#ifdef IS_BRIDGE
-#define RAISE(args...) rb_raise(rb_eArgError,"[rubypd] "args)
-#else
 #define RAISE(args...) throw new Barf(__FILE__,__LINE__,__PRETTY_FUNCTION__,args)
-#endif
-#define RAISE2(string) RAISE(string)
 
 #ifdef USE_RUBY
 typedef VALUE Ruby;
@@ -388,8 +381,8 @@
 NUMBER_TYPE_LIMITS(  int16,-0x8000,0x7fff,-1)
 NUMBER_TYPE_LIMITS(  int32,-0x80000000,0x7fffffff,-1)
 NUMBER_TYPE_LIMITS(  int64,-0x8000000000000000LL,0x7fffffffffffffffLL,-1)
-NUMBER_TYPE_LIMITS(float32,-HUGE_VAL,+HUGE_VAL,(RAISE2("all_ones"),0))
-NUMBER_TYPE_LIMITS(float64,-HUGE_VAL,+HUGE_VAL,(RAISE2("all_ones"),0))
+NUMBER_TYPE_LIMITS(float32,-HUGE_VAL,+HUGE_VAL,(RAISE("all_ones"),0))
+NUMBER_TYPE_LIMITS(float64,-HUGE_VAL,+HUGE_VAL,(RAISE("all_ones"),0))
 
 #ifdef HAVE_LITE
 #define NT_NOTLITE NT_UNIMPL
@@ -570,7 +563,6 @@
 #endif
 
 #ifdef USE_RUBY
-#ifndef IS_BRIDGE
 static Numop *convert(Ruby x, Numop **bogus) {
 	if (TYPE(x)!=T_STRING) x=rb_funcall(x,SI(to_s),0);
 	string k = string(rb_str_ptr(x));
@@ -579,7 +571,6 @@
 		return vop_dict[k];
 	} else return op_dict[k];
 }
-#endif
 #endif
 
 // ****************************************************************
@@ -658,7 +649,6 @@
 #undef INCR
 #undef DECR
 
-#ifndef IS_BRIDGE
 static inline P<Dim> convert(Ruby x, P<Dim> *foo) {
 	Grid *d = convert(x,(Grid **)0);
 	if (!d) RAISE("urgh");
@@ -669,7 +659,6 @@
 static inline PtrGrid convert(Ruby x, PtrGrid *foo) {
 	return PtrGrid(convert(x,(Grid **)0));
 }
-#endif
 
 //****************************************************************
 // GridInlet represents a grid-aware inlet

Modified: trunk/rubyext.c
==============================================================================
--- trunk/rubyext.c (original)
+++ trunk/rubyext.c Wed Apr  2 17:15:03 2008
@@ -34,7 +34,6 @@
 
 bool print_class_list;
 
-#define IS_BRIDGE
 #include "base/grid.h.fcs"
 /* resolving conflict: T_OBJECT will be PD's, not Ruby's */
 #undef T_OBJECT



More information about the Gridflow-cvs mailing list