test: fix linux compilation

This commit is contained in:
2026-05-29 20:20:31 +01:00
parent 2d396ee071
commit 99380c7810
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -22,17 +22,17 @@ int main(int argc, const char **argv)
/* TODO re-implement json support */
fx_serial_ctx *ctx = NULL;
fx_object *data;
fx_value data = FX_VALUE_EMPTY;
result = fx_serial_ctx_deserialise(ctx, src, &data, 0);
if (fx_result_is_error(result)) {
fx_throw(result);
return -1;
}
fx_object_to_string(data, fx_stdout, NULL);
fx_value_to_string(&data, fx_stdout, NULL);
fx_stream_write_char(fx_stdout, '\n');
fx_object_unref(data);
fx_value_unset(&data);
fx_object_unref(src);
fx_serial_ctx_unref(ctx);
+4 -4
View File
@@ -22,21 +22,21 @@ int main(int argc, const char **argv)
fx_serial_ctx *ctx = fx_toml_serial_ctx_create();
fx_object *data = NULL;
fx_value data = FX_VALUE_EMPTY;
result = fx_serial_ctx_deserialise(ctx, src, &data, 0);
if (fx_result_is_error(result)) {
fx_throw(result);
return -1;
}
if (!data) {
if (!fx_value_is_set(&data)) {
return 0;
}
fx_object_to_string(data, fx_stdout, NULL);
fx_value_to_string(&data, fx_stdout, NULL);
fx_stream_write_char(fx_stdout, '\n');
fx_object_unref(data);
fx_value_unset(&data);
fx_object_unref(src);
fx_serial_ctx_unref(ctx);