]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/alist.h
Apply fix from Martin Simmons to clear structure before
[bacula/bacula] / bacula / src / lib / alist.h
index f02be3d5c0c8998a63044e695c888754ece94a7b..30eefed03153f68aa7b61760c7b784a2727d1022 100644 (file)
@@ -77,6 +77,10 @@ public:
    int size() const;
    void destroy();
    void grow(int num);
+
+   /* Use it as a stack, pushing and poping from the end */
+   void push(void *item) { append(item); };
+   void pop() { num_items?NULL:remove(num_items-1); };
 };
 
 inline void * alist::operator [](int index) const {