aboutsummaryrefslogtreecommitdiff
path: root/composer/arraylist.h
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2009-08-19 23:51:59 +0000
committermescalinum <mescalinum@users.sourceforge.net>2009-08-19 23:51:59 +0000
commit1bdf5157d0707e89b1bce0a939fbcfcf33047816 (patch)
tree57831761500dd95a51d6a0616ac7b7a71bb17625 /composer/arraylist.h
parent6569fedbe695c5e6cb746ac972c467ca46b2f958 (diff)
[song] is born
svn path=/trunk/externals/ffext/; revision=11988
Diffstat (limited to 'composer/arraylist.h')
-rw-r--r--composer/arraylist.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/composer/arraylist.h b/composer/arraylist.h
index a4b4362..b625379 100644
--- a/composer/arraylist.h
+++ b/composer/arraylist.h
@@ -3,7 +3,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL */
/* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
/* */
-/* composer: a music composition framework for pure-data */
+/* arraylist.h: macro library for dynamic arrays */
/* */
/* This program is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU General Public License */
@@ -21,7 +21,6 @@
/* along with this program; if not, write to the Free Software Foundation, */
/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* */
-/* Based on PureData by Miller Puckette and others. */
/* ------------------------------------------------------------------------ */
#include "common.h"
@@ -41,7 +40,8 @@
#define ArrayListInit(arrName, type, initSize) \
arrName ## _maxsize = initSize; \
- arrName = (type*)getbytes(sizeof(type) * (initSize)); \
+ if(initSize > 0) arrName = (type*)getbytes(sizeof(type) * (initSize)); \
+ else arrName = NULL; \
arrName ## _count = 0
#define ArrayListAdd(arrName, type, objToAdd) \