[Gridflow-cvs] [svn] commit: r3658 - in /trunk: base/source_filter.rb gridflow.c gridflow.h

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Apr 25 16:37:17 EDT 2008


Author: matju
Date: Fri Apr 25 16:37:16 2008
New Revision: 3658

Log:
register superclasses correctly

Modified:
    trunk/base/source_filter.rb
    trunk/gridflow.c
    trunk/gridflow.h

Modified: trunk/base/source_filter.rb
==============================================================================
--- trunk/base/source_filter.rb (original)
+++ trunk/base/source_filter.rb Fri Apr 25 16:37:16 2008
@@ -210,7 +210,7 @@
 	Out.print "static void *#{cl}_allocator (BFObject *bself, MESSAGE) {return new #{cl}(bself,sel,argc,argv);}"
 	Out.print "static MethodDecl #{cl}_methods[] = {"
 	Out.print frame.methods.map {|foo,method| "{ \"#{method.selector}\",(Method)#{frame.name}::#{method.selector}_wrap }" }.join(",")
-	Out.print "}; static FClass ci#{cl} = { #{cl}_allocator, #{cl}_startup,"
+	Out.print "}; FClass ci#{cl} = { #{cl}_allocator, #{cl}_startup,"
 	Out.print "#{cl.inspect}, COUNT(#{cl}_methods), #{cl}_methods };"
 	get="void ___get(t_symbol *s=0) {t_atom a[1];"
 	frame.attrs.each {|name,attr|
@@ -283,7 +283,7 @@
 def handle_startall(line)
 	$classes.each {|q|
 		Out.print "fclass_install(&ci#{q.name},"
-		if q.supername then Out.print "\"#{q.supername}\"" else Out.print "0" end
+		if q.supername then Out.print "&ci#{q.supername}" else Out.print "0" end
 		Out.print ",sizeof(#{q.name}));"
 	}
 end

Modified: trunk/gridflow.c
==============================================================================
--- trunk/gridflow.c (original)
+++ trunk/gridflow.c Fri Apr 25 16:37:16 2008
@@ -688,8 +688,8 @@
 
 //----------------------------------------------------------------
 
-void fclass_install(FClass *fclass, const char *super, size_t bytes) {
-	//fclass->super = fclasses[super];
+void fclass_install(FClass *fclass, FClass *super, size_t bytes) {
+	fclass->super = super;
 	if (fclass->startup) fclass->startup(fclass);
 	fclass->bytes = bytes;
 }

Modified: trunk/gridflow.h
==============================================================================
--- trunk/gridflow.h (original)
+++ trunk/gridflow.h Fri Apr 25 16:37:16 2008
@@ -763,7 +763,7 @@
 	std::map<string,AttrDecl *> attrs;
 };
 
-void fclass_install(FClass *fc, const char *super, size_t bytes);
+void fclass_install(FClass *fc, FClass *super, size_t bytes);
 
 //****************************************************************
 // GridOutlet represents a grid-aware outlet
@@ -917,4 +917,6 @@
 extern std::map<string,FClass *> fclasses;
 int handle_braces(int ac, t_atom *av);
 
+extern FClass ciFObject, ciFormat;
+
 #endif // __GF_GRID_H



More information about the Gridflow-cvs mailing list