- size_t dataSize; ///< Size in bytes of a stack element.
- Vector* array; ///< Internal data structure: resizeable array.
+ size_t dataSize; ///< Size in bytes of a stack element.
+ Vector* array; ///< Internal data structure: resizeable array.
- Stack* stack, ///< "this" pointer.
- size_t dataSize ///< Size in bytes of a stack element.
+ Stack* stack, ///< "this" pointer.
+ size_t dataSize ///< Size in bytes of a stack element.
* @brief Return an allocated and initialized stack.
* @param type Type of a stack element (int, char*, ...).
* @brief Return an allocated and initialized stack.
* @param type Type of a stack element (int, char*, ...).
- Stack* stack, ///< "this" pointer.
- void* data ///< Data to be added.
+ Stack* stack, ///< "this" pointer.
+ void* data ///< Data to be added.
);
/**
* @brief Add something on top of the stack.
* @param stack "this" pointer.
* @param data Data to be added.
);
/**
* @brief Add something on top of the stack.
* @param stack "this" pointer.
* @param data Data to be added.
* Usage: void stack_push(Stack* stack, void data)
*/
#define stack_push(stack, data) \
{ \
* Usage: void stack_push(Stack* stack, void data)
*/
#define stack_push(stack, data) \
{ \
- typeof((data)) tmp = data; \
- _stack_push(stack,&tmp); \
+ typeof((data)) tmp = data; \
+ _stack_push(stack,&tmp); \
);
/**
* @brief Return what is on top of the stack.
* @param stack "this" pointer.
* @param data Data to be assigned.
);
/**
* @brief Return what is on top of the stack.
* @param stack "this" pointer.
* @param data Data to be assigned.
* Usage: void stack_top(Stack* stack, void data)
*/
#define stack_top(stack, data) \
{ \
* Usage: void stack_top(Stack* stack, void data)
*/
#define stack_top(stack, data) \
{ \