diff array.h @ 147:535f12e0a5af

Add a flag to prevent insertions at out of bounds
author David Demelier <markand@malikania.fr>
date Fri, 11 May 2012 20:06:41 +0200
parents e3cf5ac9a5aa
children 1558251b2cf2
line wrap: on
line diff
--- a/array.h	Fri May 11 19:06:56 2012 +0200
+++ b/array.h	Fri May 11 20:06:41 2012 +0200
@@ -33,7 +33,8 @@
 	ARRAY_AUTO		= 0,		/* array grows automatically */
 	ARRAY_FIXED		= (1 << 0),	/* fixed size length */
 	ARRAY_FASTREMOVE	= (1 << 1),	/* use last object when removing */
-	ARRAY_CLEARBITS		= (1 << 2)	/* clear data when inserting/removing */
+	ARRAY_CLEARBITS		= (1 << 2),	/* clear data when inserting/removing */
+	ARRAY_INSERTSAFE	= (1 << 3)	/* insertion must have valid indexes */
 };
 
 struct array {