↩ revert:

This commit is contained in:
lzy
2024-05-27 02:33:10 +08:00
parent 2336f88407
commit a277dec1fe
136 changed files with 606 additions and 606 deletions

View File

@@ -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);
}