mirror of
https://gitee.com/apaki/unicstl.git
synced 2026-05-29 07:04:20 +08:00
- 将所有打印和比较函数的参数指针从 `void*` 修改为 `const void*`,增强类型安全 - 引入自定义断言宏 `unicstl_assert` 及其实现,替换标准 `assert` - 优化动态数组容量增长策略,新增 `unicstl_new_capacity` 函数 - 重构链表 接口:`push`/`pop` 重命名为 `push_back`/`pop_front`,新增 `push_front`/`pop_back`/`insert`/`remove`/`contains` 方法 - 移除链表结构体中未使用的 `_index_front` 和 `_index_back` 成员 - 在头文件中补充关键函数的时间复杂度注释
50 lines
831 B
C
50 lines
831 B
C
/**
|
|
* @file unicstl_config.h
|
|
* @author wenjf (Orig5826@163.com)
|
|
* @brief
|
|
* @version 0.1
|
|
* @date 2025-04-22
|
|
*
|
|
* @copyright Copyright (c) 2025
|
|
*
|
|
*/
|
|
#ifndef _UNICSTL_CONFIG_H_
|
|
|
|
/**
|
|
* @brief unicstl contains which module
|
|
*
|
|
*/
|
|
#define UNICSTL_LIST
|
|
#define UNICSTL_STACK
|
|
#define UNICSTL_QUEUE
|
|
#define UNICSTL_DEQUE
|
|
#define UNICSTL_TREE
|
|
#define UNICSTL_HEAP
|
|
#define UNICSTL_GRAPH
|
|
#define UNICSTL_ITERATOR
|
|
|
|
/**
|
|
* @brief debug
|
|
*
|
|
*/
|
|
// #define NDEBUG // assert disable
|
|
|
|
#define UNICSTL_DEBUG
|
|
|
|
#ifdef UNICSTL_DEBUG
|
|
#define UNICSTL_DEBUG_STACK
|
|
#define UNICSTL_DEBUG_QUEUE
|
|
#define UNICSTL_DEBUG_DEQUE
|
|
#define UNICSTL_DEBUG_TREE
|
|
#define UNICSTL_DEBUG_HEAP
|
|
#define UNICSTL_DEBUG_GRAPH
|
|
#endif
|
|
|
|
/**
|
|
* @brief unicstl use which function
|
|
*
|
|
*/
|
|
#define UNICSTL_MALLOC
|
|
#define UNICSTL_ASSERT
|
|
|
|
#endif |