From 01a62cfaf31836688736788e08d9d16c79a3d01e Mon Sep 17 00:00:00 2001 From: Gregory Lirent Date: Wed, 8 Jun 2022 10:54:50 +0300 Subject: [PATCH] Add vtype/vnode macro --- src/__internal/include.h | 3 +++ src/__internal/vnode.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/__internal/include.h b/src/__internal/include.h index 285e510..9c77a66 100644 --- a/src/__internal/include.h +++ b/src/__internal/include.h @@ -79,6 +79,9 @@ ainline(val_t* value_set(val_t* d, void* ptr, vtype type, int flags)) { extern int libcdsb_vtype_compare_values(const void* s0, vtype t0, const void* s1, vtype t1); extern int libcdsb_vtype_compare_values_eq(const void* s0, const void* s1, vtype t); +#define vtype_stringify libcdsb_vtype_stringify +#define vtype_name libcdsb_vtype_name + #define vtype_compare libcdsb_vtype_compare_values #define vtype_compare_eq libcdsb_vtype_compare_values_eq diff --git a/src/__internal/vnode.h b/src/__internal/vnode.h index 4303a37..4399da4 100644 --- a/src/__internal/vnode.h +++ b/src/__internal/vnode.h @@ -33,4 +33,6 @@ extern void* libcdsb_vnode_peek(const vnode_t* x, vtype type); #define vnode_duplicate(vnode, type) libcdsb_vnode_create(vnode_peek(vnode, type), type) #define vnode_tduplicate(target_type, vnode, type) libcdsb_vnode_create_target(target_type, vnode_peek(vnode, type), type) +#define vnode_stringify(n, t) vtype_stringify(vnode_peek(n, t), t) + #endif /* LIBCDSB_SRC_INTERNAL_VNODE_H */