test: update to use new object system
This commit is contained in:
@@ -26,7 +26,7 @@ int main(int argc, const char **argv)
|
|||||||
b_serial_ctx *ctx;
|
b_serial_ctx *ctx;
|
||||||
b_serial_ctx_create(&ctx);
|
b_serial_ctx_create(&ctx);
|
||||||
|
|
||||||
b_dsref *data;
|
b_object *data;
|
||||||
b_status status = b_serial_ctx_deserialise(
|
b_status status = b_serial_ctx_deserialise(
|
||||||
ctx, B_SERIAL_FORMAT_JSON, src_stream, &data, 0);
|
ctx, B_SERIAL_FORMAT_JSON, src_stream, &data, 0);
|
||||||
if (!B_OK(status)) {
|
if (!B_OK(status)) {
|
||||||
@@ -34,10 +34,10 @@ int main(int argc, const char **argv)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
b_to_string(B_DSREF(data), b_stdout);
|
b_object_to_string(data, b_stdout);
|
||||||
b_stream_write_char(b_stdout, '\n');
|
b_stream_write_char(b_stdout, '\n');
|
||||||
|
|
||||||
b_release(data);
|
b_object_unref(data);
|
||||||
b_serial_ctx_destroy(ctx);
|
b_serial_ctx_destroy(ctx);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ int main(int argc, const char **argv)
|
|||||||
b_serial_ctx *ctx;
|
b_serial_ctx *ctx;
|
||||||
b_serial_ctx_create(&ctx);
|
b_serial_ctx_create(&ctx);
|
||||||
|
|
||||||
b_dsref *data = NULL;
|
b_object *data = NULL;
|
||||||
b_status status = b_serial_ctx_deserialise(
|
b_status status = b_serial_ctx_deserialise(
|
||||||
ctx, B_SERIAL_FORMAT_TOML, src_stream, &data, 0);
|
ctx, B_SERIAL_FORMAT_TOML, src_stream, &data, 0);
|
||||||
if (!B_OK(status)) {
|
if (!B_OK(status)) {
|
||||||
@@ -38,10 +38,10 @@ int main(int argc, const char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
b_to_string(B_DSREF(data), b_stdout);
|
b_object_to_string(data, b_stdout);
|
||||||
b_stream_write_char(b_stdout, '\n');
|
b_stream_write_char(b_stdout, '\n');
|
||||||
|
|
||||||
b_release(data);
|
b_object_unref(data);
|
||||||
b_serial_ctx_destroy(ctx);
|
b_serial_ctx_destroy(ctx);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user