From 3c52a756339a2d96824d21a7d3ad5de7fc1085a0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 27 Mar 2025 17:26:51 -0400 Subject: Deprecate custom printf specifiers in favor of print() function that uses _Generic() to generically convert any value to a string or print as a string. --- src/stdlib/datatypes.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/stdlib/datatypes.h') diff --git a/src/stdlib/datatypes.h b/src/stdlib/datatypes.h index b81ff741..40b4712a 100644 --- a/src/stdlib/datatypes.h +++ b/src/stdlib/datatypes.h @@ -34,6 +34,8 @@ typedef union { mpz_t *big; } Int_t; +#define OptionalInt_t Int_t + typedef struct { void *data; // All of the following fields add up to 64 bits, which means that array @@ -117,4 +119,10 @@ typedef struct MutexedData_s { void *data; } *MutexedData_t; +#define OptionalBool_t uint8_t +#define OptionalArray_t Array_t +#define OptionalTable_t Table_t +#define OptionalText_t Text_t +#define OptionalClosure_t Closure_t + // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3