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/enums.h | |
| parent | 4b5e4cd1f21582f5e5fa682ab4e4bff252963468 (diff) | |
Add serialization and deserialization
Diffstat (limited to 'stdlib/enums.h')
| -rw-r--r-- | stdlib/enums.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stdlib/enums.h b/stdlib/enums.h index 8afa5c9b..35c3a22a 100644 --- a/stdlib/enums.h +++ b/stdlib/enums.h @@ -12,6 +12,8 @@ PUREFUNC int32_t Enum$compare(const void *x, const void *y, const TypeInfo_t *ty PUREFUNC bool Enum$equal(const void *x, const void *y, const TypeInfo_t *type); PUREFUNC Text_t Enum$as_text(const void *obj, bool colorize, const TypeInfo_t *type); PUREFUNC bool Enum$is_none(const void *obj, const TypeInfo_t *type); +void Enum$serialize(const void *obj, FILE *out, Table_t *pointers, const TypeInfo_t *type); +void Enum$deserialize(FILE *in, void *outval, Array_t *pointers, const TypeInfo_t *type); #define Enum$metamethods ((metamethods_t){ \ .as_text=Enum$as_text, \ @@ -19,6 +21,8 @@ PUREFUNC bool Enum$is_none(const void *obj, const TypeInfo_t *type); .equal=Enum$equal, \ .hash=Enum$hash, \ .is_none=Enum$is_none, \ + .serialize=Enum$serialize, \ + .deserialize=Enum$deserialize, \ }) // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 |
