[PD-cvs] pd/src kernel.c,1.1.2.76,1.1.2.77

Mathieu Bouchard matju at users.sourceforge.net
Thu Aug 2 23:12:56 CEST 2007


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

Modified Files:
      Tag: desiredata
	kernel.c 
Log Message:
fix bugs in pd_free


Index: kernel.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v
retrieving revision 1.1.2.76
retrieving revision 1.1.2.77
diff -C2 -d -r1.1.2.76 -r1.1.2.77
*** kernel.c	31 Jul 2007 01:20:29 -0000	1.1.2.76
--- kernel.c	2 Aug 2007 21:12:54 -0000	1.1.2.77
***************
*** 148,155 ****
  
  /* convert an atom into a string, in the reverse sense of binbuf_text (q.v.)
! * special attention is paid to symbols containing the special characters
! * ';', ',', '$', and '\'; these are quoted with a preceding '\', except that
! * the '$' only gets quoted at the beginning of the string.
! */
  
  //static int should_quote(char *s) {return strchr(";,\\{}\"",*s) || isspace(*s) || (*s=='$' && isdigit(s[1]));}
--- 148,154 ----
  
  /* convert an atom into a string, in the reverse sense of binbuf_text (q.v.)
!    special attention is paid to symbols containing the special characters
!    ';', ',', '$', and '\'; these are quoted with a preceding '\', except that
!    the '$' only gets quoted at the beginning of the string. */
  
  //static int should_quote(char *s) {return strchr(";,\\{}\"",*s) || isspace(*s) || (*s=='$' && isdigit(s[1]));}
***************
*** 236,242 ****
      }
      /* schedule for deletion if need to keep the allocation around */
!     if (c->gobj && ((long)object_table->get(x)|2)) {
! 	gobj_changed((t_gobj *)x,"");
  	object_table->set(x,object_table->get(x)&~1);
      } else pd_free_zombie(x);
  }
--- 235,242 ----
      }
      /* schedule for deletion if need to keep the allocation around */
!     if (c->gobj && (object_table->get(x)&2)) {
  	object_table->set(x,object_table->get(x)&~1);
+ 	gobj_changed((t_gobj *)x,"");
+ 	//char *xx = (char *)x; for (int i=0; i<c->size; i++) xx[i]="\xde\xad\xbe\xef"[i&3];
      } else pd_free_zombie(x);
  }
***************
*** 381,386 ****
     as they count all threads together as if they're one, and they're especially incompatible with
     use of the desiredata-specific stack[] variable. */
- t_call pd_stack[STACKSIZE];
  int pd_stackn = 0; /* how much of the stack is in use */
  
  #define ENTER(SELECTOR) if(pd_stackn >= STACKSIZE) {stackerror(x); LEAVE; return;} \
--- 381,386 ----
     as they count all threads together as if they're one, and they're especially incompatible with
     use of the desiredata-specific stack[] variable. */
  int pd_stackn = 0; /* how much of the stack is in use */
+ t_call pd_stack[STACKSIZE];
  
  #define ENTER(SELECTOR) if(pd_stackn >= STACKSIZE) {stackerror(x); LEAVE; return;} \





More information about the Pd-cvs mailing list