fix(language): list_contains has the functionality of list_find, renamed to fit
parent
1631047f33
commit
09bb08dc79
2
list.c
2
list.c
|
@ -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
2
list.h
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue