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

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Apr 18 17:02:44 EDT 2008


Author: matju
Date: Fri Apr 18 17:02:44 2008
New Revision: 3599

Log:
don't create a ruby class for each FClass

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

Modified: trunk/base/grid.h
==============================================================================
--- trunk/base/grid.h (original)
+++ trunk/base/grid.h Fri Apr 18 17:02:44 2008
@@ -816,12 +816,12 @@
 	void (*startup)(FClass *);
 	const char *rubyname; // C++/Ruby name (not PD name)
 	int methodsn; MethodDecl *methods; // C++ -> Ruby methods
+	FClass *super;
 
 	int ninlets;
 	int noutlets;
 	t_class *bfclass;
 	string name;
-	Ruby rself;
 };
 
 void fclass_install(FClass *fc, const char *super);

Modified: trunk/rubyext.c
==============================================================================
--- trunk/rubyext.c (original)
+++ trunk/rubyext.c Fri Apr 18 17:02:44 2008
@@ -417,9 +417,7 @@
 //----------------------------------------------------------------
 
 void fclass_install(FClass *fclass, const char *super) {
-	fclass->rself = super ?
-		rb_define_class_under(mGridFlow, fclass->rubyname, rb_funcall(mGridFlow,SI(const_get),1,rb_str_new2(super))) :
-		rb_funcall(mGridFlow,SI(const_get),1,rb_str_new2(fclass->rubyname));
+	//fclass->super = fclasses[super];
 	if (fclass->startup) fclass->startup(fclass);
 }
 
@@ -528,9 +526,8 @@
 	mGridFlow = EVAL("module GridFlow; CObject = ::Object; self end");
 	rb_ivar_set(mGridFlow, SI(@fobjects), rb_hash_new());
 	cFObject = rb_define_class_under(mGridFlow, "FObject", rb_cObject);
-	\startall
+	cPointer = rb_define_class_under(mGridFlow, "Pointer", cFObject);
 	rb_define_singleton_method(EVAL("GridFlow::Pointer"),"new", (VALUE (*)(...))Pointer_s_new, 1);
-	cPointer = EVAL("GridFlow::Pointer");
 	startup_number();
 	startup_grid();
 	startup_flow_objects();



More information about the Gridflow-cvs mailing list