From 5ee185a4896e43c67b6d299becfa616da78fb9f4 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 21 Mar 2025 21:48:53 -0400 Subject: Move stdlib into src/ --- stdlib/structs.h | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 stdlib/structs.h (limited to 'stdlib/structs.h') diff --git a/stdlib/structs.h b/stdlib/structs.h deleted file mode 100644 index bab702cd..00000000 --- a/stdlib/structs.h +++ /dev/null @@ -1,40 +0,0 @@ -// Metamethods for structs - -#include -#include - -#include "datatypes.h" -#include "types.h" -#include "util.h" - -PUREFUNC uint64_t Struct$hash(const void *obj, const TypeInfo_t *type); -PUREFUNC uint64_t PackedData$hash(const void *obj, const TypeInfo_t *type); -PUREFUNC int32_t Struct$compare(const void *x, const void *y, const TypeInfo_t *type); -PUREFUNC bool Struct$equal(const void *x, const void *y, const TypeInfo_t *type); -PUREFUNC bool PackedData$equal(const void *x, const void *y, const TypeInfo_t *type); -PUREFUNC Text_t Struct$as_text(const void *obj, bool colorize, const TypeInfo_t *type); -PUREFUNC bool Struct$is_none(const void *obj, const TypeInfo_t *type); -void Struct$serialize(const void *obj, FILE *out, Table_t *pointers, const TypeInfo_t *type); -void Struct$deserialize(FILE *in, void *outval, Array_t *pointers, const TypeInfo_t *type); - -#define Struct$metamethods { \ - .hash=Struct$hash, \ - .compare=Struct$compare, \ - .equal=Struct$equal, \ - .as_text=Struct$as_text, \ - .is_none=Struct$is_none, \ - .serialize=Struct$serialize, \ - .deserialize=Struct$deserialize, \ -} - -#define PackedData$metamethods { \ - .hash=PackedData$hash, \ - .compare=Struct$compare, \ - .equal=PackedData$equal, \ - .as_text=Struct$as_text, \ - .is_none=Struct$is_none, \ - .serialize=Struct$serialize, \ - .deserialize=Struct$deserialize, \ -} - -// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3