[Gridflow-cvs] [svn] commit: r3584 - in /trunk: base/flow_objects.c base/grid.h rubyext.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Apr 17 00:49:08 EDT 2008


Author: matju
Date: Thu Apr 17 00:49:08 2008
New Revision: 3584

Log:
fix previous commit

Modified:
    trunk/base/flow_objects.c
    trunk/base/grid.h
    trunk/rubyext.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Thu Apr 17 00:49:08 2008
@@ -306,11 +306,6 @@
 		return r.str();
 	}
 };
-/*static t_pd *rp_to_pd (Ruby pointer) {
-       Pointer *foo;
-       Data_Get_Struct(pointer,Pointer,foo);
-       return (t_pd *)foo->p;
-}*/
 \def 0 dest (void *p) {dest = (t_pd *)p;}
 \def void end_hook () {}
 \def 0 base (int x) { if (x==2 || x==8 || x==10 || x==16) base=x; else RAISE("base %d not supported",x); }

Modified: trunk/base/grid.h
==============================================================================
--- trunk/base/grid.h (original)
+++ trunk/base/grid.h Thu Apr 17 00:49:08 2008
@@ -341,7 +341,6 @@
 	P() : p(0) {}
 	P(T *_p)            { p = _p; INCR; }
 	P(const P<T> &_p) {
-//fprintf(stderr,"350: &_p=%08x\n",(long)&_p); fprintf(stderr,"350: _p.p=%08x\n",(long)_p.p);
  p = _p.p; INCR; }
 	P<T> &operator =(T *  _p) { DECR; p=_p;   INCR; return *this; }
 	P<T> &operator =(P<T> _p) { DECR; p=_p.p; INCR; return *this; }
@@ -710,13 +709,9 @@
 	PtrGrid(const PtrGrid &_p) : P<Grid>(), dc(0), next(0) {dc=_p.dc; p=_p.p; INCR;}
 //	PtrGrid(       P<Grid> _p) : P<Grid>(), dc(0), next(0) {dc=_p.dc; p=_p.p; INCR;}
 	PtrGrid(         Grid *_p) : P<Grid>(), dc(0), next(0) {
-// fprintf(stderr,"&_p=%08x\n",(long)&_p);
-// fprintf(stderr,"_p=%08x\n",(long)_p);
           p=_p;
 INCR;}
 	PtrGrid &operator =(  Grid *_p) {if(dc&&_p)dc(_p->dim);
-// fprintf(stderr,"741: this=%08x\n",(long)this);
-// fprintf(stderr,"742: dc=%08x &_p=%08x\n",(long)this,&_p); fprintf(stderr,"742: _p=%08x\n",(long)_p);
 DECR; p=_p; INCR;
 return *this;}
 	PtrGrid &operator =(P<Grid> _p) {if(dc&&_p)dc(_p->dim); DECR; p=_p.p; INCR; return *this;}

Modified: trunk/rubyext.c
==============================================================================
--- trunk/rubyext.c (original)
+++ trunk/rubyext.c Thu Apr 17 00:49:08 2008
@@ -84,7 +84,6 @@
 Ruby cPointer=0;
 Ruby Pointer_s_new (void *ptr) {
 	Pointer *self = new Pointer(ptr);
-	fprintf(stderr,"Pointer_s_new: %p %p\n",ptr,self->p);
 	return Data_Wrap_Struct(cPointer, 0, CObject_free, self);
 }
 void *Pointer_get (Ruby rself) {
@@ -197,7 +196,6 @@
 	DGS(FObject);
 	char buf[256];
 	sprintf(buf,"_n_%s",fm->selector->s_name);
-	rb_funcall(rself,SI(to_s),0); //dummy call as test
 	if (rb_obj_respond_to(rself,rb_intern(buf),0)) {
 		rb_funcall_myrescue2(rself,rb_intern(buf),argc+1,argv);
 	} else {
@@ -298,6 +296,9 @@
 
 //****************************************************************
 
+\class Pointer : CObject
+\end class {}
+
 static void BFObject_class_init_1 (t_class *qlass) {class_addanything(qlass,(t_method)BFObject_method_missing0);}
 \class FObject
 
@@ -339,7 +340,6 @@
 
 /* warning: deleting inlets that are connected will cause pd to crash */
 void BFObject::ninlets_set (int n) {
-	//fprintf(stderr,"ninlets_set... nin=%d n=%d\n",nin,n);
 	if (!this) RAISE("there is no bself");
 	if ((Ruby)this==Qnil) RAISE("bself is nil");
 	if (n<1) RAISE("ninlets_set: n=%d must be at least 1",n);



More information about the Gridflow-cvs mailing list