projects
/
cgds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed mistake in test/makemain.sh ; still vector_pop_first to fix in src/Vector.c
[cgds.git]
/
src
/
Stack.c
diff --git
a/src/Stack.c
b/src/Stack.c
index
545e83d
..
8aa7800
100644
(file)
--- a/
src/Stack.c
+++ b/
src/Stack.c
@@
-13,6
+13,7
@@
void _stack_init(Stack* stack, size_t dataSize)
Stack* _stack_new(size_t dataSize)
{
Stack* stack = (Stack*) safe_malloc(sizeof (Stack));
Stack* _stack_new(size_t dataSize)
{
Stack* stack = (Stack*) safe_malloc(sizeof (Stack));
+ stack->array = _vector_new(dataSize);
_stack_init(stack, dataSize);
return stack;
}
_stack_init(stack, dataSize);
return stack;
}
@@
-58,6
+59,6
@@
void stack_clear(Stack* stack)
void stack_destroy(Stack* stack)
{
void stack_destroy(Stack* stack)
{
-
stack_clear(stack
);
+
vector_destroy(stack->array
);
safe_free(stack);
}
safe_free(stack);
}