33 for (
i = 0;
i <=
s->top;
i++) {
43 if (
s->top ==
s->n_elems - 1) {
46 void **elems =
realloc(
s->elems,
s->n_elems *
sizeof(
void *));
54 s->elems[
s->top] = el;
63 void *res =
s->elems[
s->top];
73 return (
size_t)(
s->top + 1);
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API bool rz_stack_is_empty(RzStack *s)
RZ_API RzStack * rz_stack_newf(ut32 n, RzStackFree f)
RZ_API void * rz_stack_pop(RzStack *s)
RZ_API void * rz_stack_peek(RzStack *s)
RZ_API bool rz_stack_push(RzStack *s, void *el)
RZ_API size_t rz_stack_size(RzStack *s)
RZ_API RzStack * rz_stack_new(ut32 n)
RZ_API void rz_stack_free(RzStack *s)
void * realloc(void *ptr, size_t size)
void(* RzStackFree)(void *ptr)