diff options
| author | mo khan <mo.khan@gmail.com> | 2020-08-09 15:47:03 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-08-09 15:47:03 -0600 |
| commit | 7c4da6d24d54a971a4e918c3a327e052f4685ccb (patch) | |
| tree | bf2e8cca2a93c0605a54c5218caea446e9c0833c /src/02/05/stack.h | |
| parent | ce1f797f4af5aee2574a021fd24c0c7405870f45 (diff) | |
Allow storing void* on Stack
Diffstat (limited to 'src/02/05/stack.h')
| -rw-r--r-- | src/02/05/stack.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/02/05/stack.h b/src/02/05/stack.h index a3f424e..0ac9ee8 100644 --- a/src/02/05/stack.h +++ b/src/02/05/stack.h @@ -1,6 +1,6 @@ typedef struct node { struct node *next; - int data; + void *data; } Node; typedef struct { @@ -8,7 +8,7 @@ typedef struct { } Stack; Stack *stack_init(); -int stack_peek(Stack *self); +void *stack_peek(Stack *self); int stack_size(Stack *self); -void stack_push(Stack *self, int data); -int stack_pop(Stack *self); +void stack_push(Stack *self, void *data); +void *stack_pop(Stack *self); |
