- 在 `core_mem.h` 中新增 `smcc_strlen` 函数,用于计算字符串长度 - 调整 `VEC` 宏定义参数,移除冗余的 name 参数,增强结构体声明一致性 - 修改 `cstring_from_cstr` 返回值字段顺序,保持代码风格统一 - 在 `libcore.h` 中增加日志相关宏定义的保护判断,防止重复定义冲突
29 lines
560 B
C
29 lines
560 B
C
#ifndef __SMCC_CORE_H__
|
|
#define __SMCC_CORE_H__
|
|
|
|
#include <core_impl.h>
|
|
#include <core_macro.h>
|
|
#include <core_mem.h>
|
|
|
|
#define __SMCC_LOG_NO_STD_IMPL__
|
|
#ifndef log_snprintf
|
|
#define log_snprintf smcc_snprintf
|
|
#endif
|
|
#ifndef log_printf
|
|
#define log_printf smcc_eprintf
|
|
#endif
|
|
#ifndef log_exit
|
|
#define log_exit smcc_exit
|
|
#endif
|
|
#include <log.h>
|
|
|
|
#define _SMCC_STR(str) #str
|
|
#define SMCC_STR(str) _SMCC_STR(str)
|
|
|
|
#define SMCC_ARRLEN(arr) (sizeof(arr) / sizeof(arr[0]))
|
|
#include <core_str.h>
|
|
#include <core_stream.h>
|
|
#include <core_vec.h>
|
|
|
|
#endif // __SMCC_CORE_H__
|