[Gridflow-cvs] [svn] commit: r3616 - in /trunk: base/flow_objects.c base/main.c base/source_filter.rb rubyext.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Apr 18 19:17:53 EDT 2008


Author: matju
Date: Fri Apr 18 19:17:53 2008
New Revision: 3616

Log:
cleanup

Modified:
    trunk/base/flow_objects.c
    trunk/base/main.c
    trunk/base/source_filter.rb
    trunk/rubyext.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Fri Apr 18 19:17:53 2008
@@ -51,15 +51,6 @@
     va_end(args);
 }
 
-/* ---------------------------------------------------------------- */
-/* stuff for using source_filter.rb without <ruby.h>: */
-
-#if 0
-#define SI(arg) gensym(#arg)
-#define SYM(arg) gensym(#arg)
-#endif
-
-/* end of stuff for using source_filter.rb without <ruby.h>. */
 /* ---------------------------------------------------------------- */
 
 // BAD HACK: GCC complains: unimplemented (--debug mode only) (i don't remember which GCC this was)

Modified: trunk/base/main.c
==============================================================================
--- trunk/base/main.c (original)
+++ trunk/base/main.c Fri Apr 18 19:17:53 2008
@@ -134,9 +134,6 @@
 	return strdup(buf);
 }
 
-/* ---------------------------------------------------------------- */
-/* C++<->Ruby bridge for classes/functions in base/number.c */
-
 NumberTypeE NumberTypeE_find (string s) {
 	if (number_type_dict.find(s)==number_type_dict.end()) RAISE("unknown number type \"%s\"", s.data());
 	return number_type_dict[s]->index;
@@ -146,8 +143,6 @@
 	if (x.a_type!=A_SYMBOL) RAISE("expected number-type (as symbol)");
 	return NumberTypeE_find(string(x.a_w.w_symbol->s_name));
 }
-
-/* ---------------------------------------------------------------- */
 
 // don't touch.
 static void gfmemcopy32(int32 *as, int32 *bs, long n) {

Modified: trunk/base/source_filter.rb
==============================================================================
--- trunk/base/source_filter.rb (original)
+++ trunk/base/source_filter.rb Fri Apr 18 19:17:53 2008
@@ -22,7 +22,6 @@
 	Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 =end
 
-$keywords = %w(class decl def end grdecl)
 $stack = []
 $classes = []
 $exit = 0
@@ -311,7 +310,6 @@
 	}
 end
 
-$rubymode=false
 $linenumber=1
 loop{
 	x = In.gets
@@ -325,13 +323,7 @@
 			File.unlink ARGV[1]
 			exit 1
 		end
-	else
-		if $stack[-1]==:ruby then
-			x.gsub!(/([\\\"])/) { "\\"+$1 }
-			x="\"#{x.chomp}\\n\"\n"
-		end
-		Out.puts x
-	end
+	else Out.puts x end
 	$linenumber+=1
 }
 

Modified: trunk/rubyext.c
==============================================================================
--- trunk/rubyext.c (original)
+++ trunk/rubyext.c Fri Apr 18 19:17:53 2008
@@ -21,22 +21,7 @@
 	Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
-/*
-'bridge_puredata.c' becomes 'gridflow.pd_linux' which loads Ruby and tells
-Ruby to load the other 95% of Gridflow. GridFlow creates the FObject class
-and then subclasses it many times, each time calling FObject.install(),
-which tells the bridge to register a class in puredata. Puredata
-objects have proxies for each of the non-first inlets so that any inlet
-may receive any distinguished message. All inlets are typed as 'anything',
-and the 'anything' method translates the whole message to Ruby objects and
-tries to call a Ruby method of the proper name.
-*/
-
 #include "base/grid.h.fcs"
-/* resolving conflict: T_OBJECT will be PD's, not Ruby's */
-#undef T_OBJECT
-#undef T_DATA
-//#undef EXTERN
 #include <ctype.h>
 #include <stdarg.h>
 #include <unistd.h>
@@ -48,17 +33,6 @@
 #ifdef HAVE_GEM
 #include "Base/GemPixDualObj.h"
 #endif
-
-/* I don't remember why we have to undefine Ruby's T_DATA;
-   on Linux there is no conflict with any other library */
-#if RUBY_VERSION_MINOR == 8
-#define T_DATA   0x22
-#else
-#define T_DATA   0x12
-#endif
-
-// call f(x) and if fails call g(y)
-#define RESCUE(f,x,g,y) rb_rescue2((VALUE (*)(...))(f),(Ruby)(x),(VALUE (*)(...))(g),(Ruby)(y),rb_eException,0);
 
 std::map<string,FClass *> fclasses;
 std::map<t_class *,FClass *> fclasses_pd;



More information about the Gridflow-cvs mailing list