]> git.sur5r.net Git - cc65/commitdiff
Added AUTO_COLLECTION_INITIALIZER
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 27 Sep 2001 05:54:40 +0000 (05:54 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 27 Sep 2001 05:54:40 +0000 (05:54 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@977 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/common/coll.c
src/common/coll.h

index fa7fe6e9a24979c9582209ba0c2723c3c7acf701..ffae7f608e1f18149e938ebc6eb196b038b01cc8 100644 (file)
 
 
 
+/*****************************************************************************/
+/*                                          Data                                    */
+/*****************************************************************************/
+
+
+
+/* An empty collection */
+const Collection EmptyCollection = STATIC_COLLECTION_INITIALIZER;
+
+
+
 /*****************************************************************************/
 /*                                          Code                                    */
 /*****************************************************************************/
index 7f29a1a5ea3d0f5b0ef5f4793fb150f2c1c1b6de..9f5539afc0d4f237ef9a9ea3ee2218426358de8b 100644 (file)
@@ -59,9 +59,15 @@ struct Collection {
     void**             Items;          /* Array with dynamic size */
 };
 
+/* An empty collection */
+extern const Collection EmptyCollection;
+
 /* Initializer for static collections */
 #define STATIC_COLLECTION_INITIALIZER  { 0, 0, 0 }
 
+/* Initializer for auto collections */
+#define AUTO_COLLECTION_INITIALIZER     EmptyCollection;
+
 
 
 /*****************************************************************************/