Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Convert sol-util functions to use sol-buffer #536

@barbieri

Description

@barbieri

Functions like sol_util_load_file_raw() and sol_util_fill_buffer()should be using sol_buffer instead of own buffer manipulation functions.

This also have nice side-effects like allowing sol_util_load_file_string() getting the sol_util_load_file_raw() buffer and being able to ensure the trailing \0 without the need of a `realloc()``

Also report on functions that would help this task, I already envision sol_buffer_trim() that calls sol_buffer_resize(buf, buf->used) that could be used at the string version before it returns. Maybe sol_buffer_steal(buf) to take buf->data and reset buf->used = 0; buf->capacity = 0;?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions