runtime: update fx api usage

This commit is contained in:
2026-06-15 17:41:08 +01:00
parent 0140f768cf
commit c68b1d2b26
4 changed files with 10 additions and 13 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ static enum bshell_status process_record(
}
fx_string *record = fx_string_create_from_cstr(
fx_stringstream_ptr(cmd_p->cmd_tmp));
fx_stringstream_get_cstr(cmd_p->cmd_tmp));
bshell_pipeline_write_value(
pipeline,
FX_VALUE_OBJECT(record),
+1 -1
View File
@@ -347,7 +347,7 @@ enum bshell_status bshell_table_ctx_print_record(
}
size_t to_write = fx_stringstream_get_length(strm);
const char *s = fx_stringstream_ptr(strm);
const char *s = fx_stringstream_get_cstr(strm);
bool overflow = false;
if (to_write > c->col_width) {
to_write = c->col_width - 2;
+6 -9
View File
@@ -140,7 +140,7 @@ static bshell_command *resolve_native_command_local(
}
bshell_command *result
= bshell_native_command_create(fx_path_ptr(cmd_path));
= bshell_native_command_create(fx_path_get_cstr(cmd_path));
fx_path_unref(cmd_path);
return result;
}
@@ -171,19 +171,16 @@ static bshell_command *resolve_native_command(
fx_foreach(v, it)
{
const char *tok = NULL;
fx_value_get_cstr(v, &tok);
fx_path *dir_path = fx_path_create_from_cstr(tok);
const fx_path *parts[] = {dir_path, cmd_name_path};
fx_path *full_path
= fx_path_join(parts, sizeof parts / sizeof parts[0]);
fx_path_unref(dir_path);
= fx_path_join_list(2, v, &FX_VALUE_OBJECT(cmd_name));
if (!fx_path_is_file(full_path)) {
fx_path_unref(full_path);
continue;
}
result = bshell_native_command_create(fx_path_ptr(full_path));
result = bshell_native_command_create(
fx_path_get_cstr(full_path));
fx_path_unref(full_path);
break;
}
@@ -254,8 +251,8 @@ static enum bshell_status process_args(struct bshell_cmdcall_p *cmdcall)
for (i32 i = cmdcall->cmd_args.count - 1; i >= 0; i--) {
fx_stringstream_reset(str);
fx_value_to_string(&cmdcall->cmd_args.items[i], str, NULL);
fx_string *arg_str
= fx_string_create_from_cstr(fx_stringstream_ptr(str));
fx_string *arg_str = fx_string_create_from_cstr(
fx_stringstream_get_cstr(str));
fx_array_push_back(
cmdcall->cmd_args_processed,
FX_VALUE_OBJECT(arg_str));
+2 -2
View File
@@ -220,7 +220,7 @@ static enum bshell_status eval_instruction(
fx_value_unset(&y);
const fx_property *prop
= fx_type_get_property(ty, fx_stringstream_ptr(strm));
= fx_type_get_property(ty, fx_stringstream_get_cstr(strm));
fx_stringstream_unref(strm);
if (!prop) {
@@ -267,7 +267,7 @@ static enum bshell_status eval_instruction(
fx_value_to_string(&x, strm, NULL);
fx_string_prepend_cstr(
result,
fx_stringstream_ptr(strm));
fx_stringstream_get_cstr(strm));
fx_value_unset(&x);
arg--;
}