[Gridflow-cvs] [svn] commit: r4097 - /trunk/base/flow_objects.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Oct 3 15:49:03 EDT 2008


Author: matju
Date: Fri Oct  3 15:49:03 2008
New Revision: 4097

Log:
"put_at ( $1 $2 $3 )" may also be written "put_at $1 $2 $3" now.

Modified:
    trunk/base/flow_objects.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Fri Oct  3 15:49:03 2008
@@ -389,7 +389,7 @@
 	}
 	\decl 0 bang ();
 	\decl 1 reassign ();
-	\decl 1 put_at (Grid *index);
+	\decl 1 put_at (...);
 	\grin 0 int
 	\grin 1
 	template <class T> void compute_indices(T *v, long nc, long nd);
@@ -545,7 +545,14 @@
 	pd_list((t_pd *)bself,&s_list,2,a);
 }
 \def 1 reassign () {put_at=0;}
-\def 1 put_at (Grid *index) {put_at=index;}
+\def 1 put_at (...) {
+	if (argv[0].a_type==A_LIST) put_at=convert(argv[0],(Grid **)0);
+	else {
+		put_at=new Grid(new Dim(argc),int32_e);
+		int32 *v = (int32 *)*put_at;
+		for (int i=0; i<argc; i++) v[i]=convert(argv[i],(int32 *)0);
+	}
+}
 \end class {install("#store",2,1); add_creator("@store");}
 
 //****************************************************************



More information about the Gridflow-cvs mailing list