[PD-cvs] pd/src m_pd.h, 1.4.4.11.2.33.2.42, 1.4.4.11.2.33.2.43 desire.c, 1.1.2.217.2.133, 1.1.2.217.2.134
Mathieu Bouchard
matju at users.sourceforge.net
Tue Jan 16 02:36:56 CET 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23150
Modified Files:
Tag: desiredata
m_pd.h desire.c
Log Message:
replacing appendix's dirtyc,dirtyv by manager's dirty.
Index: m_pd.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
retrieving revision 1.4.4.11.2.33.2.42
retrieving revision 1.4.4.11.2.33.2.43
diff -C2 -d -r1.4.4.11.2.33.2.42 -r1.4.4.11.2.33.2.43
*** m_pd.h 9 Jan 2007 23:13:21 -0000 1.4.4.11.2.33.2.42
--- m_pd.h 16 Jan 2007 01:36:52 -0000 1.4.4.11.2.33.2.43
***************
*** 191,200 ****
struct _gobj **obs; /* I spy with my little I */
/* miscellaneous */
- /* the dirty stuff should be a hashtable in t_manager. this is a hack
- until pd has hashtables other than the big global one. having the dirties
- here sort of defeats the purpose of the observer pattern *and* will cause
- trouble with multiple-clients. */
- int dirtyc;
- t_atom dirtyv[3];
t_hash *visual;
} t_appendix;
--- 191,194 ----
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.133
retrieving revision 1.1.2.217.2.134
diff -C2 -d -r1.1.2.217.2.133 -r1.1.2.217.2.134
*** desire.c 16 Jan 2007 00:56:32 -0000 1.1.2.217.2.133
--- desire.c 16 Jan 2007 01:36:52 -0000 1.1.2.217.2.134
***************
*** 104,108 ****
self->nobs = 0;
self->obs = 0;
- self->dirtyc = 0;
self->visual = hash_new(1);
return self;
--- 104,107 ----
***************
*** 288,291 ****
--- 287,291 ----
t_clock *clock;
t_binbuf *b; /* reusable, for processing messages from the gui */
+ t_hash *dirty;
};
***************
*** 303,309 ****
pd_free(o);
} else {
! if (o->dix->dirtyc) {
pd_upload(o);
! o->dix->dirtyc = 0;
}
}
--- 303,309 ----
pd_free(o);
} else {
! if (hash_exists(self->dirty,o)) {
pd_upload(o);
! hash_delete(self->dirty,o);
}
}
***************
*** 314,323 ****
void manager_notice (t_gobj *self_, t_gobj *origin, int argc, t_atom *argv) {
t_manager *self = (t_manager *)self_;
! t_appendix *a = (t_appendix *)origin->dix;
! if (!a->dirtyc) {
queue_put(self->q,origin);
! a->dirtyc = 1;
}
- SETFLOAT(a->dirtyv,-1); /* in the future this may contain real data instead */
}
--- 314,321 ----
void manager_notice (t_gobj *self_, t_gobj *origin, int argc, t_atom *argv) {
t_manager *self = (t_manager *)self_;
! if (!hash_exists(self->dirty,origin)) {
queue_put(self->q,origin);
! hash_set(self->dirty,origin,0);
}
}
***************
*** 328,331 ****
--- 326,330 ----
self->b = binbuf_new();
clock_delay(self->clock,0);
+ self->dirty = hash_new(127);
return self;
}
More information about the Pd-cvs
mailing list