Rizin
unix-like reverse engineering framework and cli tools
rz_stack.h
Go to the documentation of this file.
1 #ifndef RZ_STACK_H
2 #define RZ_STACK_H
3 
4 #include <rz_types.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 typedef void (*RzStackFree)(void *ptr);
11 
12 typedef struct rz_stack_t {
13  void **elems;
14  unsigned int n_elems;
15  int top;
18 
23 RZ_API bool rz_stack_push(RzStack *s, void *el);
25 RZ_API size_t rz_stack_size(RzStack *s);
27 
28 #ifdef __cplusplus
29 }
30 #endif
31 
32 #endif // RZ_STACK_H
#define RZ_API
uint32_t ut32
int n
Definition: mipsasm.c:19
static RzSocket * s
Definition: rtr.c:28
RZ_API bool rz_stack_is_empty(RzStack *s)
Definition: stack.c:68
void(* RzStackFree)(void *ptr)
Definition: rz_stack.h:10
RZ_API RzStack * rz_stack_newf(ut32 n, RzStackFree f)
Definition: stack.c:21
RZ_API void * rz_stack_pop(RzStack *s)
Definition: stack.c:59
struct rz_stack_t RzStack
RZ_API void * rz_stack_peek(RzStack *s)
Definition: stack.c:76
RZ_API bool rz_stack_push(RzStack *s, void *el)
Definition: stack.c:42
RZ_API size_t rz_stack_size(RzStack *s)
Definition: stack.c:72
RZ_API RzStack * rz_stack_new(ut32 n)
Definition: stack.c:6
RZ_API void rz_stack_free(RzStack *s)
Definition: stack.c:29
#define f(i)
Definition: sha256.c:46
void ** elems
Definition: rz_stack.h:13
RzStackFree free
Definition: rz_stack.h:16
int top
Definition: rz_stack.h:15
unsigned int n_elems
Definition: rz_stack.h:14