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

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Wed Apr 2 02:48:39 EDT 2008


Author: matju
Date: Wed Apr  2 02:48:38 2008
New Revision: 3401

Log:
remove rb_raise0, rb_ary_fetch

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

Modified: trunk/base/grid.h
==============================================================================
--- trunk/base/grid.h (original)
+++ trunk/base/grid.h Wed Apr  2 02:48:38 2008
@@ -82,12 +82,6 @@
 #else
 typedef long Ruby;
 #endif
-
-extern "C" {
-void rb_raise0(
-const char *file, int line, const char *func, Ruby exc, const char *fmt, ...)
-__attribute__ ((noreturn));
-};
 
 #define VA int argc, Ruby *argv
 #define SI(_sym_) (rb_intern(#_sym_))
@@ -244,6 +238,7 @@
 		if (TYPE(r)==T_STRING) return gensym((char *)rb_str_ptr(r));
  		RAISE("want symbol");
 	}
+	//operator NumberTypeE () const {return NumberTypeE_find((t_symbol *)*this);}
 	operator std::string () const {
 		if (TYPE(r)==T_SYMBOL) return std::string(rb_sym_name(r));
 		if (TYPE(r)==T_STRING) return std::string(rb_str_ptr(r));

Modified: trunk/base/main.c
==============================================================================
--- trunk/base/main.c (original)
+++ trunk/base/main.c Wed Apr  2 02:48:38 2008
@@ -45,25 +45,6 @@
 Ruby mGridFlow;
 Ruby cFObject;
 
-extern "C"{
-void rb_raise0(
-const char *file, int line, const char *func, VALUE exc, const char *fmt, ...) {
-	va_list args;
-	char buf[BUFSIZ];
-	va_start(args,fmt);
-	vsnprintf(buf, BUFSIZ, fmt, args);
-	buf[BUFSIZ-1]=0;
-	va_end(args);
-	VALUE e = rb_exc_new2(exc, buf);
-	char buf2[BUFSIZ];
-	snprintf(buf2, BUFSIZ, "%s:%d:in `%s'", file, line, func);
-	buf2[BUFSIZ-1]=0;
-	VALUE ary = rb_funcall(e,SI(caller),0);
-	rb_funcall(ary,SI(unshift),1,rb_str_new2(buf2));
-	rb_funcall(e,SI(set_backtrace),1,ary);
-	rb_exc_raise(e);
-}};
-
 Barf::Barf(const char *s, ...) {
     char buf[1024];
     va_list ap;
@@ -82,11 +63,6 @@
     buf[1023]=0;
     va_end(ap);
     text = strdup(buf);
-}
-
-Ruby rb_ary_fetch(Ruby rself, long i) {
-	Ruby argv[] = { LONG2NUM(i) };
-	return rb_ary_aref(COUNT(argv),argv,rself);
 }
 
 void pd_oprintf (std::ostream &o, const char *s, int argc, t_atom *argv) {



More information about the Gridflow-cvs mailing list