🌈 style:
This commit is contained in:
@@ -2,28 +2,28 @@
|
||||
|
||||
#include "stack.h"
|
||||
|
||||
LLIST *stack_create(int initsize)
|
||||
LLIST* stack_create(int initsize)
|
||||
{
|
||||
return llist_create(initsize);
|
||||
}
|
||||
|
||||
int stack_push(STACK *ptr, const void *data)
|
||||
int stack_push(STACK* ptr, const void* data)
|
||||
{
|
||||
return llist_insert(ptr, data, LLIST_FORWARD);
|
||||
}
|
||||
|
||||
static int always_match(const void *p1, const void *p2)
|
||||
static int always_match(const void* p1, const void* p2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int stack_pop(STACK *ptr, void *data)
|
||||
int stack_pop(STACK* ptr, void* data)
|
||||
{
|
||||
// !!! 假接口
|
||||
return llist_fetch(ptr, (void *)0, always_match, data);
|
||||
return llist_fetch(ptr, (void*)0, always_match, data);
|
||||
}
|
||||
|
||||
void stack_destroy(STACK *ptr)
|
||||
void stack_destroy(STACK* ptr)
|
||||
{
|
||||
llist_destroy(ptr);
|
||||
}
|
||||
Reference in New Issue
Block a user