feat(core): 添加字符串长度计算函数并优化数据结构定义
- 在 `core_mem.h` 中新增 `smcc_strlen` 函数,用于计算字符串长度 - 调整 `VEC` 宏定义参数,移除冗余的 name 参数,增强结构体声明一致性 - 修改 `cstring_from_cstr` 返回值字段顺序,保持代码风格统一 - 在 `libcore.h` 中增加日志相关宏定义的保护判断,防止重复定义冲突
This commit is contained in:
@@ -8,8 +8,7 @@
|
||||
#ifndef __SMCC_STRPOOL_H__
|
||||
#define __SMCC_STRPOOL_H__
|
||||
|
||||
#include "hashtable.h"
|
||||
#include "string.h"
|
||||
#include "hashmap.h"
|
||||
#include <libcore.h>
|
||||
|
||||
/**
|
||||
@@ -19,7 +18,7 @@
|
||||
* 组合哈希表和专用内存分配器实现的高效字符串存储池
|
||||
*/
|
||||
typedef struct strpool {
|
||||
hash_table_t ht; /**< 哈希表用于快速查找已存储字符串 */
|
||||
hashmap_t ht; /**< 哈希表用于快速查找已存储字符串 */
|
||||
} strpool_t;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user