diff --git a/src/common/coll.c b/src/common/coll.c index fa7fe6e9a..ffae7f608 100644 --- a/src/common/coll.c +++ b/src/common/coll.c @@ -45,6 +45,17 @@ +/*****************************************************************************/ +/* Data */ +/*****************************************************************************/ + + + +/* An empty collection */ +const Collection EmptyCollection = STATIC_COLLECTION_INITIALIZER; + + + /*****************************************************************************/ /* Code */ /*****************************************************************************/ diff --git a/src/common/coll.h b/src/common/coll.h index 7f29a1a5e..9f5539afc 100644 --- a/src/common/coll.h +++ b/src/common/coll.h @@ -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; + /*****************************************************************************/