changeset 826:18a4409b6f88

val: str/sym VAL_* macros should assert on error This is consistent with the rest of the API. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Wed, 30 Dec 2020 12:43:32 -0500
parents 93d6c996250f
children 0ccca7ddbaec
files include/jeffpc/val.h
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/include/jeffpc/val.h	Wed Dec 30 10:34:10 2020 -0500
+++ b/include/jeffpc/val.h	Wed Dec 30 12:43:32 2020 -0500
@@ -435,15 +435,15 @@
 #define VAL_ALLOC_SYM(s)	sym_cast_to_val(SYM_ALLOC(s))
 #define STR_ALLOC_STATIC(s)	_VAL_ALLOC(struct str, str_alloc_static(s))
 #define SYM_ALLOC_STATIC(s)	_VAL_ALLOC(struct sym, sym_alloc_static(s))
-#define VAL_ALLOC_STR_STATIC(s)	str_cast_to_val(str_alloc_static(s))
-#define VAL_ALLOC_SYM_STATIC(s)	sym_cast_to_val(sym_alloc_static(s))
+#define VAL_ALLOC_STR_STATIC(s)	str_cast_to_val(STR_ALLOC_STATIC(s))
+#define VAL_ALLOC_SYM_STATIC(s)	sym_cast_to_val(SYM_ALLOC_STATIC(s))
 #define STR_DUP(s)		_VAL_ALLOC(struct str, str_dup(s))
 #define SYM_DUP(s)		_VAL_ALLOC(struct sym, sym_dup(s))
-#define VAL_DUP_STR(s)		str_cast_to_val(str_dup(s))
-#define VAL_DUP_SYM(s)		sym_cast_to_val(sym_dup(s))
+#define VAL_DUP_STR(s)		str_cast_to_val(STR_DUP(s))
+#define VAL_DUP_SYM(s)		sym_cast_to_val(SYM_DUP(s))
 #define STR_DUP_LEN(s, l)	_VAL_ALLOC(struct str, str_dup_len((s), (l)))
 #define SYM_DUP_LEN(s, l)	_VAL_ALLOC(struct sym, sym_dup_len((s), (l)))
-#define VAL_DUP_STR_LEN(s, l)	str_cast_to_val(str_dup_len((s), (l)))
-#define VAL_DUP_SYM_LEN(s, l)	sym_cast_to_val(sym_dup_len((s), (l)))
+#define VAL_DUP_STR_LEN(s, l)	str_cast_to_val(STR_DUP_LEN((s), (l)))
+#define VAL_DUP_SYM_LEN(s, l)	sym_cast_to_val(SYM_DUP_LEN((s), (l)))
 
 #endif