feat 重构stream流API并适配lex_parse和lexer

This commit is contained in:
zzy
2025-12-08 23:04:11 +08:00
parent 1ab07a5815
commit 36bff64a91
17 changed files with 402 additions and 244 deletions

View File

@@ -57,7 +57,7 @@ static inline void cstring_free(cstring_t *str) {
if (str == null) {
return;
}
if (str->data != null && str->cap != 0) {
if (str->cap != 0 && str->data != null) {
smcc_free(str->data);
str->data = null;
}