- Timestamp:
- 08/08/05 20:43:07 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/void_stack.c
r38 r52 90 90 void void_stack_destroy(void_stack* stack) 91 91 { 92 free(stack->elements); 92 93 free(stack); 93 94 } … … 99 100 for(i=0; i < stack->top; i++) 100 101 free(stack->elements[i]); 102 free(stack->elements); 101 103 free(stack); 102 104 } … … 127 129 if(stack->top > 0) 128 130 { 129 ret_val = stack->elements[-- stack->top];131 ret_val = stack->elements[--(stack->top)]; 130 132 stack->elements[stack->top] = NULL; 131 133 }
Note: See TracChangeset
for help on using the changeset viewer.