runtime: update fx api usage
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user