unicstl/include/unicstl_config.h
jf-home 529cf60218 refactor(arraylist): 基于 darray 重构实现并支持负索引
- 将 arraylist 内部实现改为组合 darray 对象,委托核心操作至 darray
- 移除 arraylist 中冗余的内存管理代码(如手动维护 obj、capacity 等)
- 新增负索引支持(如 -1 访问末尾元素),完善 get/set/at 的边界检查
- 优化 darray 源码,使用内联辅助函数(obj_shift, obj_copy)封装指针操作
2026-05-17 12:57:20 +08:00

92 lines
1.6 KiB
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_
#define _UNICSTL_CONFIG_H_
// clang-format off
// #define NDEBUG // release mode if define
#ifndef NDEBUG
#define UNICSTL_DEBUG
#endif
/**
* @brief unicstl contains which module
*
*/
#define UNICSTL_ARRAYLIST
#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 malloc config
*
*/
#define UNICSTL_MALLOC_ENABLE // malloc enable
// #define UNICSTL_MALLOC_CUSTOM // malloc custom support
/**
* @brief
*
*/
#ifdef UNICSTL_DEBUG
/**
* @brief assert config
*
*/
#define UNICSTL_ASSERT_ENABLE // assert enable
// #define ASSERT_CUSTOM // assert custom support
/**
* @brief logger config
*
*/
#define LOGGER_ENABLE // logger enable
/**
* @brief debug level
* LOG_DEBUG
* LOG_INFO
* LOG_WARN
* LOG_ERROR
* LOG_NONE
*/
#define LOG_LEVEL LOG_DEBUG
/**
* @brief
* LOG_DETAIL_DISABLE
* LOG_DETAIL_ENABLE
*/
#define LOG_DEBUG_DETAIL LOG_DETAIL_ENABLE
#define LOG_FILE_ENABLE
// #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 // UNICSTL_DEBUG
// clang-format on
#endif // _UNICSTL_CONFIG_H_