diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-29 18:09:12 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-29 18:09:12 -0500 |
| commit | f66f8ad7119207b99f00ea2ea389550ee65db5b3 (patch) | |
| tree | 5b5a7c887b311e3de2f2cb293b1228598c5b9eb1 /stdlib/channels.h | |
| parent | 4b5e4cd1f21582f5e5fa682ab4e4bff252963468 (diff) | |
Add serialization and deserialization
Diffstat (limited to 'stdlib/channels.h')
| -rw-r--r-- | stdlib/channels.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stdlib/channels.h b/stdlib/channels.h index 9a848107..cd0a82f8 100644 --- a/stdlib/channels.h +++ b/stdlib/channels.h @@ -25,6 +25,8 @@ PUREFUNC int32_t Channel$compare(const void *x, const void *y, const TypeInfo_t PUREFUNC bool Channel$equal(const void *x, const void *y, const TypeInfo_t *type); Text_t Channel$as_text(const void *channel, bool colorize, const TypeInfo_t *type); PUREFUNC bool Channel$is_none(const void *obj, const TypeInfo_t*); +void Channel$serialize(const void *obj, FILE *out, Table_t *pointers, const TypeInfo_t*); +void Channel$deserialize(FILE *in, void *outval, Array_t *pointers, const TypeInfo_t*); #define Channel$metamethods ((metamethods_t){ \ .as_text=Channel$as_text, \ @@ -32,6 +34,8 @@ PUREFUNC bool Channel$is_none(const void *obj, const TypeInfo_t*); .equal=Channel$equal, \ .hash=Channel$hash, \ .is_none=Channel$is_none, \ + .serialize=Channel$serialize, \ + .deserialize=Channel$deserialize, \ }) #define Channel$info(item_info) &((TypeInfo_t){.size=sizeof(Channel_t), .align=__alignof__(Channel_t), \ |
