changeset 827:0ccca7ddbaec

val: add VAL_ALLOC_BLOB* macros Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Fri, 01 Jan 2021 12:51:20 -0500
parents 18a4409b6f88
children 3fa2ebce953c
files include/jeffpc/val.h
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/include/jeffpc/val.h	Wed Dec 30 12:43:32 2020 -0500
+++ b/include/jeffpc/val.h	Fri Jan 01 12:51:20 2021 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2020 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+ * Copyright (c) 2014-2021 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -429,6 +429,10 @@
 #define VAL_ALLOC_ARRAY_DUP(v, l)	_VAL_ALLOC(struct val, val_alloc_array_dup((v), (l)))
 #define VAL_ALLOC_ARRAY_STATIC(v, l)	_VAL_ALLOC(struct val, val_alloc_array_static((v), (l)))
 
+#define VAL_ALLOC_BLOB(v, l)		_VAL_ALLOC(struct val, val_alloc_blob((v), (l)))
+#define VAL_ALLOC_BLOB_DUP(v, l)	_VAL_ALLOC(struct val, val_alloc_blob_dup((v), (l)))
+#define VAL_ALLOC_BLOB_STATIC(v, l)	_VAL_ALLOC(struct val, val_alloc_blob_static((v), (l)))
+
 #define STR_ALLOC(s)		_VAL_ALLOC(struct str, str_alloc(s))
 #define SYM_ALLOC(s)		_VAL_ALLOC(struct sym, sym_alloc(s))
 #define VAL_ALLOC_STR(s)	str_cast_to_val(STR_ALLOC(s))