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

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Mon Jun 2 12:04:24 EDT 2008


Author: matju
Date: Mon Jun  2 12:04:24 2008
New Revision: 3740

Log:
trying to get rid of "type-punning" warning. no pun intended. or not.

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 Mon Jun  2 12:04:24 2008
@@ -207,7 +207,7 @@
 	cl = frame.name
 	line="{}" if /^\s*$/ =~ line
 	Out.print "static void #{cl}_startup (FClass *fclass);"
-	Out.print "static void *#{cl}_allocator (BFObject *bself, MESSAGE) {return new #{cl}(bself,sel,argc,argv);}"
+	Out.print "static FObject *#{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}\",(FMethod)#{frame.name}::#{method.selector}_wrap }" }.join(",")
 	Out.print "}; FClass ci#{cl} = {#{cl}_allocator,#{cl}_startup,#{cl.inspect},COUNT(#{cl}_methods),#{cl}_methods};"

Modified: trunk/gridflow.c
==============================================================================
--- trunk/gridflow.c (original)
+++ trunk/gridflow.c Mon Jun  2 12:04:24 2008
@@ -605,7 +605,7 @@
 #endif
 #endif
 	t_allocator alloc = fclasses[string(classsym->s_name)]->allocator;
-	bself->self = (FObject *)alloc(bself,0,j,(t_atom2 *)argv);
+	bself->self = alloc(bself,0,j,(t_atom2 *)argv);
 
 	while (j<argc) {
 		j++;

Modified: trunk/gridflow.h
==============================================================================
--- trunk/gridflow.h (original)
+++ trunk/gridflow.h Mon Jun  2 12:04:24 2008
@@ -751,7 +751,7 @@
 	AttrDecl(string name_, string type_) {name=name_; type=type_;}
 };
 struct BFObject;
-typedef void *(*t_allocator)(BFObject *,MESSAGE3);
+typedef FObject *(*t_allocator)(BFObject *,MESSAGE3);
 struct FClass {
 	t_allocator allocator; // returns a new C++ object
 	void (*startup)(FClass *);



More information about the Gridflow-cvs mailing list