feat(core): rename string and stream functions for clarity
- Rename `cstring_push` to `cstring_append_ch` and `cstring_push_cstr` to `cstring_append_cstr` for consistent naming with new `cstring_append` function - Update all callers in lexer and tests to use new function names - Rename stream `destroy` method to `drop` for consistency with resource management conventions - Fix potential overflow in string capacity calculation by adjusting growth logic
This commit is contained in:
@@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
|
||||
core_mem_probe_stream_init(&mem_stream, buffer, fsize, false);
|
||||
Assert(stream != null);
|
||||
cstring_clear(&stream->name);
|
||||
cstring_push_cstr(&stream->name, file_name, strlen(file_name));
|
||||
cstring_append_cstr(&stream->name, file_name, strlen(file_name));
|
||||
lexer_init(&lexer, stream);
|
||||
lexer_tok_t tok;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user