Implement HashTable + fix some extra blank spaces, remove Bool type (using bool ...
[cgds.git] / src / Stack.c
index 545e83d..92457c0 100644 (file)
@@ -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->array = _vector_new(dataSize);
        _stack_init(stack, dataSize);
        return stack;
 }
@@ -26,7 +27,7 @@ Stack* stack_copy(Stack* stack)
        return stackCopy;
 }
 
-Bool stack_empty(Stack* stack)
+bool stack_empty(Stack* stack)
 {
        return vector_empty(stack->array);
 }
@@ -58,6 +59,6 @@ void stack_clear(Stack* stack)
 
 void stack_destroy(Stack* stack)
 {
-       stack_clear(stack);
+       vector_destroy(stack->array);
        safe_free(stack);
 }