Update generics (vtype_variable)

This commit is contained in:
2023-03-23 16:29:10 +03:00
parent a3107ef73b
commit a4c95fe95e
6 changed files with 32 additions and 30 deletions
+2
View File
@@ -26,6 +26,7 @@
vtype_double: VTYPE_DOUBLE,\
vtype_ldouble: VTYPE_LDOUBLE))
#define _LIBCDSB_vtypeof(x) vtypeof(_Generic((x), default: (x), const char*: &(x), char*: &(x)))
#define _LIBCDSB_value_pointer(x) _Generic((x), default: &(x),\
vtype_string*: (x), const vtype_string*: (x),\
@@ -34,6 +35,7 @@
vtype_map*: (x), const vtype_map*: (x),\
vtype_set*: (x), const vtype_set*: (x),\
vtype_dict*: (x), const vtype_dict*: (x))
#define _LIBCDSB_var(x) libcdsb_variable_build(_LIBCDSB_value_pointer(x), _LIBCDSB_vtypeof(x))
#define _LIBCDSB_to_cstring(x) _Generic((x), default: _LIBCDSB_nothing,\
vtype_string*: _LIBCDSB_deref1, const vtype_string*: _LIBCDSB_deref1,\