[PD-cvs] pd/src desire.c,1.1.2.217.2.129,1.1.2.217.2.130
Mathieu Bouchard
matju at users.sourceforge.net
Tue Jan 16 00:35:58 CET 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11516
Modified Files:
Tag: desiredata
desire.c
Log Message:
pd_upload records that an object has been uploaded; skip zombies in object_table.
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.129
retrieving revision 1.1.2.217.2.130
diff -C2 -d -r1.1.2.217.2.129 -r1.1.2.217.2.130
*** desire.c 15 Jan 2007 23:11:04 -0000 1.1.2.217.2.129
--- desire.c 15 Jan 2007 23:35:53 -0000 1.1.2.217.2.130
***************
*** 6390,6394 ****
}
appendix_save(self,b);
-
binbuf_gettext(b,&s,&n);
if (s[n-1]=='\n') n--;
--- 6390,6393 ----
***************
*** 6423,6426 ****
--- 6422,6428 ----
}
}
+ if (hash_exists(object_table,self)) {
+ hash_set(object_table,self,(void *)((long)hash_get(object_table,self)|2)); /* has been uploaded */
+ } else post("object_table is broken");
}
***************
*** 7677,7685 ****
t_symbol *s_inlet = gensym("inlet");
t_symbol *s___list = gensym("__list");
! int inlets=0, lists=0;
hashkey k; hashvalue v;
post("object_table = {");
hash_foreach(k,v,object_table) {
t_pd *x = (t_pd *)k;
//post(" %p %ld %s",k,(long)v,x->_class->name->name);
if (x->_class->name == s_inlet) {inlets++; continue;}
--- 7679,7688 ----
t_symbol *s_inlet = gensym("inlet");
t_symbol *s___list = gensym("__list");
! size_t inlets=0, lists=0, zombies=0;
hashkey k; hashvalue v;
post("object_table = {");
hash_foreach(k,v,object_table) {
t_pd *x = (t_pd *)k;
+ if (!(long)v&1) {zombies++; continue;} /* skip zombies */
//post(" %p %ld %s",k,(long)v,x->_class->name->name);
if (x->_class->name == s_inlet) {inlets++; continue;}
***************
*** 7693,7698 ****
} else post(" %p %ld (%dobs) %s",k,(long)v,nobs,x->_class->name->name);
}
! post("} (%d non-omitted objects, plus %d [inlet], plus %d [__list])",
! hash_size(object_table)-inlets-lists,inlets,lists);
}
--- 7696,7701 ----
} else post(" %p %ld (%dobs) %s",k,(long)v,nobs,x->_class->name->name);
}
! post("} (%ld non-omitted objects, plus %ld [inlet], plus %ld [__list], plus %ld zombies)",
! hash_size(object_table)-inlets-lists-zombies,inlets,lists,zombies);
}
More information about the Pd-cvs
mailing list