refactoring done, small bugfixes included, vectors and lists of non-primitive types are not working though

This commit is contained in:
Odweta
2024-02-05 00:16:25 +01:00
parent 8832a2a4aa
commit e40b61a21b
9 changed files with 631 additions and 797 deletions
+12 -12
View File
@@ -16,26 +16,26 @@
typedef struct {
size_t size; // number of elements that are inside the list
size_t capacity; // how many elements can be put inside
vector_t* data; // vector of vectors
vector_t *data; // vector of vectors
} list_t;
list_t* listInit(); // returns a new list
list_t *list_new(); // returns a new list
void listPush(list_t* l, dataType_e type, void* element); // appends an element at the end of a list
void list_push(list_t *this, type_e type, void *element); // appends an element at the end of a list
void listPrint(list_t* l); // prints a list
void _listPrintRecursive(list_t* l, int depth);
void list_show(list_t *this); // prints a list
void _list_print_recursive(list_t *this, int depth);
void listCleanup(list_t* l); // freeing pointers
void list_cleanup(list_t *this); // freeing pointers
void* listPop(list_t* l); // popping the last value of the list and returning it
void *list_pop(list_t *this); // popping the last value of the list and returning it
void listInsertAt(list_t* l, int index, dataType_e type, void* element); // inserts an element at a given index
void list_insert_at(list_t *this, int index, type_e type, void *element); // inserts an element at a given index
void listRemoveAt(list_t* l, int index);
void list_remove_at(list_t *this, int index);
void listSetAt(list_t* l, int index, dataType_e type, void* element);
void list_set_at(list_t *this, int index, type_e type, void *element);
void* listGetAt(list_t* l, int index);
void *list_get_at(list_t *this, int index);
#endif
#endif // LIST_H