fix(language): list_contains has the functionality of list_find, renamed to fit

main
Sara 2024-09-10 15:07:19 +02:00
parent 1631047f33
commit 09bb08dc79
2 changed files with 2 additions and 2 deletions

2
list.c
View File

@ -168,7 +168,7 @@ void* list_iterator_end(List* self) {
return list_at_unchecked(self, self->len); return list_at_unchecked(self, self->len);
} }
size_t list_contains(List* self, void* query) { size_t list_find(List* self, void* query) {
union { union {
uint8_t* as_byte; uint8_t* as_byte;
void* as_void; void* as_void;

2
list.h
View File

@ -29,7 +29,7 @@ extern void list_erase(List* self, size_t at);
extern void* list_iterator_begin(List* self); extern void* list_iterator_begin(List* self);
extern void* list_iterator_end(List* self); extern void* list_iterator_end(List* self);
extern size_t list_contains(List* self, void* query); extern size_t list_find(List* self, void* query);
#define list_from_type(T) list_init(sizeof(T)) #define list_from_type(T) list_init(sizeof(T))
#define list_from_type_with_len(T, __len) list_with_len(sizeof(T), __len) #define list_from_type_with_len(T, __len) list_with_len(sizeof(T), __len)