Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions arraylist.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/* This file was automatically generated. Do not edit! */
typedef struct arraylist arraylist;
struct arraylist {
unsigned int size; // Count of items currently in list
unsigned int capacity; // Allocated memory size, in items
void** body; // Pointer to allocated memory for items (of size capacity * sizeof(void*))
};
void arraylist_destroy(arraylist *l);
void arraylist_splice(arraylist *l,arraylist *source,unsigned int index);
void arraylist_join(arraylist *l,arraylist *source);
Expand All @@ -13,14 +18,12 @@ void arraylist_set(arraylist *l,unsigned int index,void *value);
void *arraylist_get(arraylist *l,unsigned int index);
void *arraylist_pop(arraylist *l);
void arraylist_add(arraylist *l,void *item);
inline unsigned int arraylist_size(arraylist *l);
inline unsigned int arraylist_size(arraylist *l){
return l->size;
}
void arraylist_allocate(arraylist *l,unsigned int size);
arraylist *arraylist_create();
#define arraylist_iterate(l, index, item) \
for (index = 0, item = l->body[0]; index < l->size; item = l->body[++index])
struct arraylist {
unsigned int size; // Count of items currently in list
unsigned int capacity; // Allocated memory size, in items
void** body; // Pointer to allocated memory for items (of size capacity * sizeof(void*))
};

#define INTERFACE 0