[PD-cvs] pd/src kernel.c,1.1.2.79,1.1.2.80

Mathieu Bouchard matju at users.sourceforge.net
Fri Aug 3 16:59:35 CEST 2007


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

Modified Files:
      Tag: desiredata
	kernel.c 
Log Message:
"out of memory" *is* an error


Index: kernel.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v
retrieving revision 1.1.2.79
retrieving revision 1.1.2.80
diff -C2 -d -r1.1.2.79 -r1.1.2.80
*** kernel.c	3 Aug 2007 01:01:28 -0000	1.1.2.79
--- kernel.c	3 Aug 2007 14:59:33 -0000	1.1.2.80
***************
*** 49,53 ****
      if (nbytes < 1) nbytes = 1;
      void *ret = (void *)calloc(nbytes, 1);
!     if (!ret) post("pd: getbytes() failed -- out of memory");
      return ret;
  }
--- 49,53 ----
      if (nbytes < 1) nbytes = 1;
      void *ret = (void *)calloc(nbytes, 1);
!     if (!ret) error("pd: getbytes() failed -- out of memory");
      return ret;
  }
***************
*** 64,68 ****
      void *ret = (void *)realloc((char *)old, newsize);
      if (newsize > oldsize && ret) memset(((char *)ret) + oldsize, 0, newsize - oldsize);
!     if (!ret) post("pd: resizebytes() failed -- out of memory");
      return ret;
  }
--- 64,68 ----
      void *ret = (void *)realloc((char *)old, newsize);
      if (newsize > oldsize && ret) memset(((char *)ret) + oldsize, 0, newsize - oldsize);
!     if (!ret) error("pd: resizebytes() failed -- out of memory");
      return ret;
  }





More information about the Pd-cvs mailing list