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

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Sun Apr 27 23:29:48 EDT 2008


Author: matju
Date: Sun Apr 27 23:29:47 2008
New Revision: 3678

Log:
must rename Method to FMethod because of name conflict with Objective-C language (OSX)

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 Sun Apr 27 23:29:47 2008
@@ -209,7 +209,7 @@
 	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 MethodDecl #{cl}_methods[] = {"
-	Out.print frame.methods.map {|foo,method| "{ \"#{method.selector}\",(Method)#{frame.name}::#{method.selector}_wrap }" }.join(",")
+	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};"
 	get="void ___get(t_symbol *s=0) {t_atom a[1];"
 	frame.attrs.each {|name,attr|

Modified: trunk/gridflow.c
==============================================================================
--- trunk/gridflow.c (original)
+++ trunk/gridflow.c Sun Apr 27 23:29:47 2008
@@ -495,13 +495,13 @@
 #define pd_class(x) (*(t_pd *)x)
 #define pd_classname(x) (fclasses_pd[pd_class(x)]->name.data())
 
-static Method funcall_lookup (FClass *fclass, const char *sel) {
+static FMethod funcall_lookup (FClass *fclass, const char *sel) {
 	int n = fclass->methodsn;
 	for (int i=0; i<n; i++) if (strcmp(fclass->methods[i].selector,sel)==0) return fclass->methods[i].method;
 	if (fclass->super) return funcall_lookup(fclass->super,sel);
 	return 0;
 }
-static Method funcall_lookup (BFObject *bself, const char *sel) {
+static FMethod funcall_lookup (BFObject *bself, const char *sel) {
 	return funcall_lookup(fclasses_pd[pd_class(bself)],sel);
 }
 
@@ -526,7 +526,7 @@
 	SETFLOAT(argv+0,winlet);
 	char buf[256];
 	sprintf(buf,"_n_%s",selector->s_name);
-	Method m;
+	FMethod m;
 	m = funcall_lookup(bself,buf);
 	if (m) {m(bself->self,argc+1,argv); return;}
 	sprintf(buf,"_%d_%s",winlet,selector->s_name);
@@ -762,7 +762,7 @@
 	} else {
 		//t_atom a[1];
 		//outlet_anything(bself->outlets[bself->noutlets-1],s,1,a);
-		Method m = funcall_lookup(bself,"___get");
+		FMethod m = funcall_lookup(bself,"___get");
 		t_atom2 a[1];
 		SETSYMBOL(a,s);
 		if (m) m(this,1,a);

Modified: trunk/gridflow.h
==============================================================================
--- trunk/gridflow.h (original)
+++ trunk/gridflow.h Sun Apr 27 23:29:47 2008
@@ -208,7 +208,7 @@
 
 struct FObject;
 struct t_atom2;
-typedef void (*Method)(FObject *, int, t_atom2 *);
+typedef void (*FMethod)(FObject *, int, t_atom2 *);
 typedef std::string string;
 
 #define BUILTIN_SYMBOLS(MACRO) \
@@ -332,7 +332,7 @@
 };
 
 // you shouldn't use MethodDecl directly (used by source_filter.rb)
-struct MethodDecl {const char *selector; Method method;};
+struct MethodDecl {const char *selector; FMethod method;};
 
 #undef check
 



More information about the Gridflow-cvs mailing list