Files
bluelib/object/list.h
Max Wash 5634506433 object: add b_list object
b_list behaves exactly like b_queue, with two key differences:

  1) it is memory-managed like other b_objects, which means it
     is stored on the heap and ref-counted.
  2) it is not an invasive data structure, and will automatically
     create and manage list nodes that contain pointers to the
     list items.
2025-06-27 21:43:57 +01:00

20 lines
266 B
C

#ifndef _BLUELIB_LIST_H_
#define _BLUELIB_LIST_H_
#include "object.h"
#include <blue/core/queue.h>
struct b_list {
struct b_object l_base;
struct b_queue l_queue;
size_t l_len;
};
struct b_list_entry {
struct b_queue_entry e_entry;
void *e_data;
};
#endif