struct _Stack
contains a pointer to a struct List
,
we do need to allocate storage for a struct _Stack
object:
struct Stack *Stack_new(void) { struct _Stack *tmp; tmp = (struct _Stack *)malloc(sizeof(struct _Stack)); tmp->pList = List_new(); return (struct Stack *)tmp; }