fixed some errors

This commit is contained in:
Odweta
2024-02-06 22:04:47 +01:00
parent e40b61a21b
commit f9e820efbc
10 changed files with 355 additions and 355 deletions
+12 -12
View File
@@ -2,12 +2,12 @@
#define LIST_H
/*
* What is this?
* What is self?
*
* A list (as I interpret it in this library)
* A list (as I interpret it in self library)
* is a `vector_t` of other `vector_t`s, where
* every inner `vector_t` can be of any type ->
* this means a Python-like list
* self means a Python-like list
*/
#include <odweta/vector.h>
@@ -21,21 +21,21 @@ typedef struct {
list_t *list_new(); // returns a new list
void list_push(list_t *this, type_e type, void *element); // appends an element at the end of a list
void list_push(list_t *self, type_e type, void *element); // appends an element at the end of a list
void list_show(list_t *this); // prints a list
void _list_print_recursive(list_t *this, int depth);
void list_show(list_t *self); // prints a list
void _list_print_recursive(list_t *self, int depth);
void list_cleanup(list_t *this); // freeing pointers
void list_cleanup(list_t *self); // freeing pointers
void *list_pop(list_t *this); // popping the last value of the list and returning it
void *list_pop(list_t *self); // popping the last value of the list and returning it
void list_insert_at(list_t *this, int index, type_e type, void *element); // inserts an element at a given index
void list_insert_at(list_t *self, int index, type_e type, void *element); // inserts an element at a given index
void list_remove_at(list_t *this, int index);
void list_remove_at(list_t *self, int index);
void list_set_at(list_t *this, int index, type_e type, void *element);
void list_set_at(list_t *self, int index, type_e type, void *element);
void *list_get_at(list_t *this, int index);
void *list_get_at(list_t *self, int index);
#endif // LIST_H