serial: update to use new object system

This commit is contained in:
2025-10-19 21:01:27 +01:00
parent 297ccdc9ce
commit 6e979579ea
5 changed files with 169 additions and 184 deletions

View File

@@ -1,12 +1,11 @@
#ifndef BLUELIB_SERIAL_H_
#define BLUELIB_SERIAL_H_
#ifndef BLUE_SERIAL_H_
#define BLUE_SERIAL_H_
#include <blue/core/misc.h>
#include <blue/core/object.h>
#include <blue/core/status.h>
#include <blue/core/stream.h>
struct b_dsref;
typedef enum b_serial_format {
B_SERIAL_FORMAT_NONE = 0,
B_SERIAL_FORMAT_BITCODE,
@@ -25,11 +24,11 @@ BLUE_API b_status b_serial_ctx_create(b_serial_ctx **out);
BLUE_API b_status b_serial_ctx_destroy(b_serial_ctx *ctx);
BLUE_API b_status b_serial_ctx_serialise(
b_serial_ctx *ctx, b_serial_format fmt, struct b_dsref *src,
b_stream *dest, b_serial_flags flags);
b_serial_ctx *ctx, b_serial_format fmt, b_object *src, b_stream *dest,
b_serial_flags flags);
BLUE_API b_status b_serial_ctx_deserialise(
b_serial_ctx *ctx, b_serial_format fmt, b_stream *src,
struct b_dsref **dest, b_serial_flags flags);
b_serial_ctx *ctx, b_serial_format fmt, b_stream *src, b_object **dest,
b_serial_flags flags);
#endif