feat(runtime): 添加字符串和内存操作工具函数
- 在 `core_mem.h` 中新增 `smcc_strhash32`、`smcc_strlen` 和 `smcc_strcmp` 函数, 提供 C 字符串的哈希、长度获取和比较功能 - 完善 `core_str.h` 中 `cstring_t` 结构体及相关操作函数的注释说明 - 更新 `core_str.h` 头文件保护宏命名,增强模块标识一致性 - 修改 `core_vec.h` 文件头部保护宏名称以匹配实际文件名 另外,在 lexer 测试运行代码中引入日志相关头文件并调整日志级别设置逻辑。
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
* 提供类型安全的动态数组容器实现,支持自动扩容和基本操作
|
||||
*/
|
||||
|
||||
#ifndef __SMCC_CORE_DARRAY_H__
|
||||
#define __SMCC_CORE_DARRAY_H__
|
||||
#ifndef __SMCC_CORE_VEC_H__
|
||||
#define __SMCC_CORE_VEC_H__
|
||||
|
||||
#include "core_impl.h"
|
||||
#include "core_type.h"
|
||||
@@ -114,4 +114,4 @@
|
||||
(vec).size = (vec).cap = 0; \
|
||||
} while (0)
|
||||
|
||||
#endif // __SMCC_CORE_DARRAY_H__
|
||||
#endif // __SMCC_CORE_VEC_H__
|
||||
|
||||
Reference in New Issue
Block a user