[PD-cvs] pd/src desire.c,1.1.2.217.2.183,1.1.2.217.2.184

Mathieu Bouchard matju at users.sourceforge.net
Fri Aug 3 02:26:47 CEST 2007


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27627

Modified Files:
      Tag: desiredata
	desire.c 
Log Message:
DEBUG_QUEUE doesn't crash upon dead object


Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.183
retrieving revision 1.1.2.217.2.184
diff -C2 -d -r1.1.2.217.2.183 -r1.1.2.217.2.184
*** desire.c	1 Aug 2007 17:38:52 -0000	1.1.2.217.2.183
--- desire.c	3 Aug 2007 00:26:43 -0000	1.1.2.217.2.184
***************
*** 27,34 ****
  #include <sstream>
  
- // oops, c99 only (is it standard C++ ?)
- #define round(x)  floor( x+0.5)
- #define roundf(x) floorf(x+0.5)
- 
  #ifdef MSW
  #include <io.h>
--- 27,30 ----
***************
*** 197,203 ****
  }
  
! //#define DEBUG_QUEUE
  
  static void pd_print (t_pd *self, char *header) {
  	if (self->_class->patchable) {
  		t_binbuf *b = ((t_text *)self)->binbuf;
--- 193,200 ----
  }
  
! #define DEBUG_QUEUE
  
  static void pd_print (t_pd *self, char *header) {
+ 	if (self->_class->gobj && (object_table->get(self)&1)==0) {printf("%s %p dead\n",header,self); return;}
  	if (self->_class->patchable) {
  		t_binbuf *b = ((t_text *)self)->binbuf;
***************
*** 205,213 ****
  			char *buf; int bufn;
  			binbuf_gettext(b,&buf,&bufn);
! 			printf("%s [%.*s]\n",header,bufn,buf);
  			return;
  		}
  	}
! 	printf("%s (%s)\n",header,self->_class->name->name);
  }
  
--- 202,210 ----
  			char *buf; int bufn;
  			binbuf_gettext(b,&buf,&bufn);
! 			printf("%s %p [%.*s]\n",header,self,bufn,buf);
  			return;
  		}
  	}
! 	printf("%s %p (%s)\n",header,self,self->_class->name->name);
  }
  
***************
*** 7428,7432 ****
      char *buf;
      va_list ap;
!     dopost("consistency check failed: ");
      va_start(ap, fmt);
      vasprintf(&buf,fmt,ap);
--- 7425,7429 ----
      char *buf;
      va_list ap;
!     dopost("bug: ");
      va_start(ap, fmt);
      vasprintf(&buf,fmt,ap);





More information about the Pd-cvs mailing list