Update generics (vtype_variable)
This commit is contained in:
@@ -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,\
|
||||
|
||||
Reference in New Issue
Block a user