ds: string: add verbs to function names

This commit is contained in:
2026-04-20 22:03:11 +01:00
parent c39f50a0ee
commit 321622ac16
6 changed files with 133 additions and 51 deletions
+5 -5
View File
@@ -147,7 +147,7 @@ static fx_object *dict_at(const struct fx_dict_p *dict, const char *key)
struct fx_dict_bucket_item *item
= fx_unbox(struct fx_dict_bucket_item, entry, bi_entry);
if (!strcmp(fx_string_ptr(item->bi_str), key)) {
if (!strcmp(fx_string_get_cstr(item->bi_str), key)) {
return item->bi_value;
}
@@ -425,11 +425,11 @@ static void dict_to_string(const fx_object *obj, fx_stream *out)
struct fx_dict_p *dict = fx_object_get_private(obj, FX_TYPE_DICT);
if (dict_is_empty(dict)) {
fx_stream_write_string(out, "{}", NULL);
fx_stream_write_cstr(out, "{}", NULL);
return;
}
fx_stream_write_string(out, "{\n", NULL);
fx_stream_write_cstr(out, "{\n", NULL);
fx_stream_push_indent(out, 1);
size_t len = dict_get_size(dict);
@@ -446,7 +446,7 @@ static void dict_to_string(const fx_object *obj, fx_stream *out)
struct fx_dict_bucket_item, entry, bi_entry);
fx_object_to_string(item->bi_str, out);
fx_stream_write_string(out, ": ", NULL);
fx_stream_write_cstr(out, ": ", NULL);
bool is_string = fx_object_is_type(
item->bi_value, FX_TYPE_STRING);
@@ -462,7 +462,7 @@ static void dict_to_string(const fx_object *obj, fx_stream *out)
}
if (i < len - 1) {
fx_stream_write_string(out, ",", NULL);
fx_stream_write_cstr(out, ",", NULL);
}
fx_stream_write_char(out, '\n');