[Gridflow-cvs] [svn] commit: r3253 - in /trunk: base/flow_objects.c base/flow_objects.rb rubyext.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Mar 20 00:10:33 EDT 2008


Author: matju
Date: Thu Mar 20 00:10:32 2008
New Revision: 3253

Log:
some more progress on [display] and Pointer stuff

Modified:
    trunk/base/flow_objects.c
    trunk/base/flow_objects.rb
    trunk/rubyext.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Thu Mar 20 00:10:32 2008
@@ -247,6 +247,8 @@
 			int n = strlen(s);
 			t_atom a[n];
 			for (int i=0; i<n; i++) SETFLOAT(a+i,s[i]);
+			//fprintf(stderr,"dest=%p\n",dest);
+			//fprintf(stderr,"*dest={%08x,%08x,%08x,%08x,...}\n",dest[0],dest[1],dest[2],dest[3]);
 			pd_list(dest,&s_list,n,a);
 		}
 	}
@@ -301,7 +303,6 @@
 	this->dest = 0;
 	this->name = name;
 	base=10; trunc=70; maxrows=50;
-	fprintf(stderr,"#print:initialize rself=%lx self=%p bself=%p\n",rself,this,bself);
 }
 /*static t_pd *rp_to_pd (Ruby pointer) {
        Pointer *foo;
@@ -309,8 +310,8 @@
        return (t_pd *)foo->p;
 }*/
 \def void _0_dest (Pointer *p) {
-	fprintf(stderr,"#print:_0_dest    rself=%lx self=%p bself=%p\n",rself,this,bself);
-	dest = (t_pd *)(p->p);
+	dest = *(t_pd **)(p->p); // what's THIS ???
+	//fprintf(stderr,"#print:_0_dest    rself=%lx self=%p bself=%p p=%p dest=%p\n",rself,this,bself,p,dest);
 }
 \def void end_hook () {}
 \def void _0_base (int x) { if (x==2 || x==8 || x==10 || x==16) base=x; else RAISE("base %d not supported",x); }
@@ -2306,7 +2307,7 @@
 	int n;
 	PtrGrid a;
 	GridPack() : n(0xdeadbeef) {}
-	\decl void initialize (int n=2, NumberTypeE nt=float32_e);
+	\decl void initialize (int n=2, NumberTypeE nt=int32_e);
 	\decl void initialize2 ();
 	\decl void _n_float (int inlet, float f);
 	\decl void _0_bang ();

Modified: trunk/base/flow_objects.rb
==============================================================================
--- trunk/base/flow_objects.rb (original)
+++ trunk/base/flow_objects.rb Thu Mar 20 00:10:32 2008
@@ -549,7 +549,9 @@
 	end
 	def initialize2()
 		super
-		Pd.send_in @gp, 0, :dest, bself
+		b=bself
+		STDERR.puts "initialize2: bself=#{b.inspect}"
+		Pd.send_in @gp, 0, :dest, b
 	end
 	def _0_set_size(sy,sx) @sy, at sx=sy,sx end
 	def atom_to_s a
@@ -581,7 +583,7 @@
 		GridFlow.gui %{ #{canvas} delete #{@rsym} #{@rsym}TEXT \n} if @vis
 		super
 	end
-	def _0_grid(*foo) @gp.send_in 0, :grid, *foo end
+	def _0_grid(*foo) Pd.send_in @gp, 0, :grid, *foo end
 	install "display", 2, 1
 	gui_enable
 

Modified: trunk/rubyext.c
==============================================================================
--- trunk/rubyext.c (original)
+++ trunk/rubyext.c Thu Mar 20 00:10:32 2008
@@ -112,7 +112,9 @@
 
 Ruby Pointer_s_new (void *ptr) {
 	Pointer *self = new Pointer(ptr);
-	return self->rself = Data_Wrap_Struct(cPointer, 0, CObject_free, self);
+	self->rself = Data_Wrap_Struct(cPointer, 0, CObject_free, self);
+	//fprintf(stderr,"making rself=%p self=%p, a Pointer to %p\n",self->rself,self,ptr);
+	return self->rself;
 }
 void *Pointer_get (Ruby rself) {
 	DGS(Pointer);



More information about the Gridflow-cvs mailing list