added stack datatype to std

This commit is contained in:
herbglitch 2024-02-08 02:48:08 -07:00
parent 61b7e89d63
commit 875b69c407
3 changed files with 9 additions and 5 deletions

View file

@ -38,6 +38,7 @@ set(ARCHEUS_STD_SOURCES
src/std/handler.c
src/std/hashtable.c
src/std/io.c
src/std/stack.c
src/std/string.c
src/std/vector.c
src/std/defaults/config.c

View file

@ -18,7 +18,7 @@ typedef struct ARC_Vector ARC_Vector;
* @param a first data struct
* @param b second data struct
*
* @return 0 when a == b
* @return 0 when a == b, TODO: return and ARC_Bool
*/
typedef int32_t (* ARC_Vector_CompareDataFn)(void *a, void *b);
@ -45,8 +45,9 @@ void ARC_Vector_Add(ARC_Vector *vector, void *data);
/**
* @brief remove from ARC_Vector
*
* @param vector ARC_Vector to remove from
* @param data data that is being removed
* @param vector ARC_Vector to remove from
* @param data data that is being removed
* @param compare comparison callback to get check if data should be removed
*/
void ARC_Vector_Remove(ARC_Vector *vector, void *data, ARC_Vector_CompareDataFn compare);
@ -62,6 +63,8 @@ void ARC_Vector_RemoveIndex(ARC_Vector *vector, uint32_t *index);
* @brief gets size of vector
*
* @param vector ARC_Vector to get size from
*
* @return the pointer of the vectors size, TODO: don't pass as a pointer
*/
uint32_t *ARC_Vector_Size(ARC_Vector *vector);