Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18262
Modified Files:
Tag: desiredata
desire.c desire.h
Log Message:
debugging for serial.
Index: desire.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.h,v
retrieving revision 1.1.2.49.2.3
retrieving revision 1.1.2.49.2.4
diff -C2 -d -r1.1.2.49.2.3 -r1.1.2.49.2.4
*** desire.h 3 Dec 2006 04:04:20 -0000 1.1.2.49.2.3
--- desire.h 5 Dec 2006 23:45:49 -0000 1.1.2.49.2.4
***************
*** 326,329 ****
--- 326,331 ----
//EXTERN int pd_pickle(t_foo *foo, char *fmt, ...);
void pd_set_newest (t_pd *x);
+ void pd_set_newest_debug (t_pd *x, const char *file, int line);
+ #define pd_set_newest(x) pd_set_newest_debug(x,__FILE__,__LINE__)
#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus)
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.30
retrieving revision 1.1.2.217.2.31
diff -C2 -d -r1.1.2.217.2.30 -r1.1.2.217.2.31
*** desire.c 5 Dec 2006 20:15:40 -0000 1.1.2.217.2.30
--- desire.c 5 Dec 2006 23:45:47 -0000 1.1.2.217.2.31
***************
*** 864,874 ****
--- 864,887 ----
}
+ void glob_newest_table(t_pd*);
+
+ #undef pd_set_newest
+ void pd_set_newest_debug (t_pd *x, const char *file, int line) {
+ post("pd_set_newest(x%lx) called from %s at line %d",(long)x,file,line);
+ pd_set_newest(x);
+ }
+
void pd_set_newest (t_pd *x) {
newest = x;
if (!pd_origin()) return; /* the following only applies to objects created by client */
unsigned short serial = manager->serial++;
+ //post("hash_set newest_table x%lx %d",(void*)x,(int)serial);
+ if (hash_exists(newest_table,x)) post("WARNING: duplicate serial for object x%lx",(long)x);
hash_set(newest_table,x,(void*)serial);
+ //glob_newest_table(0);
/* sys_vgui("serial %d x%lx\n",serial,(long)x);*/
}
+ #define pd_set_newest(x) pd_set_newest_debug(x,__FILE__,__LINE__);
+
/* called by m_class.c */
***************
*** 6621,6625 ****
--- 6634,6640 ----
}
if (hash_exists(newest_table,x)) {
+ //glob_newest_table(0);
sys_vgui("serial %d x%lx\n",hash_get(newest_table,x),(long)x);
+ //post("hash_delete newest_table x%lx",(long)x);
hash_delete(newest_table,x);
}
***************
*** 7795,7798 ****
--- 7810,7820 ----
}
+ void glob_newest_table(t_pd *ignore) {
+ hashkey k;
+ hashvalue v;
+ post("newest_table = {");
+ hash_foreach(k,v,newest_table) post(" x%lx -> %5d",(void*)k,(int)v);
+ post("}");
+ }
extern t_class *glob_pdobject;
***************
*** 7854,7857 ****
--- 7876,7880 ----
class_addmethod3(c,glob_help, "help", "s");
class_addmethod3(c,glob_redraw, "redraw", "");
+ class_addmethod3(c,glob_newest_table, "newest_table", "");
class_addanything(c, max_default);
pd_bind((t_pd *)&glob_pdobject, gensym("pd"));