From 8cba6c3c24c2122c843aa0feaa26fd6e5c2412e2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 30 Mar 2025 17:27:52 -0400 Subject: Deprecate built-in Moment datatype in favor of a `time` module --- src/types.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/types.c') diff --git a/src/types.c b/src/types.c index 8b9289cb..07b6ced0 100644 --- a/src/types.c +++ b/src/types.c @@ -29,7 +29,6 @@ CORD type_to_cord(type_t *t) { case BoolType: return "Bool"; case ByteType: return "Byte"; case CStringType: return "CString"; - case MomentType: return "Moment"; case TextType: return Match(t, TextType)->lang ? Match(t, TextType)->lang : "Text"; case BigIntType: return "Int"; case IntType: return CORD_asprintf("Int%d", Match(t, IntType)->bits); @@ -497,7 +496,6 @@ PUREFUNC size_t type_size(type_t *t) case BoolType: return sizeof(bool); case ByteType: return sizeof(uint8_t); case CStringType: return sizeof(char*); - case MomentType: return sizeof(Moment_t); case BigIntType: return sizeof(Int_t); case IntType: { switch (Match(t, IntType)->bits) { @@ -590,7 +588,6 @@ PUREFUNC size_t type_align(type_t *t) case BoolType: return __alignof__(bool); case ByteType: return __alignof__(uint8_t); case CStringType: return __alignof__(char*); - case MomentType: return __alignof__(Moment_t); case BigIntType: return __alignof__(Int_t); case IntType: { switch (Match(t, IntType)->bits) { @@ -704,11 +701,6 @@ type_t *get_field_type(type_t *t, const char *field_name) if (streq(field_name, "length")) return INT_TYPE; return NULL; } - case MomentType: { - if (streq(field_name, "seconds")) return Type(IntType, .bits=TYPE_IBITS64); - else if (streq(field_name, "microseconds")) return Type(IntType, .bits=TYPE_IBITS64); - return NULL; - } default: return NULL; } } -- cgit v1.2.3