From 4b3a61106a7d38cd904ab021b82a4a487df61f0a Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Sat, 10 Feb 2024 14:28:38 -0500 Subject: changes --- include/nbt.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/nbt.h b/include/nbt.h index ba7e0a6..9df7680 100644 --- a/include/nbt.h +++ b/include/nbt.h @@ -33,13 +33,17 @@ typedef enum { NBT_TAG_COMPOUND, NBT_TAG_INT_ARRAY, - NBT_TAG_LONG_ARRAY + NBT_TAG_LONG_ARRAY, + + NBT_TAG_MAX /* not a real type */ } nbt_type_t; typedef struct nbt__tag_tag nbt_tag_t; /* API inspired by jansson's API (it is nice to use) */ +nbt_type_t nbt_tag_type(nbt_tag_t *tag); + /* constructors and management functions */ nbt_tag_t *nbt_byte(nbt_byte_t b); nbt_tag_t *nbt_short(nbt_short_t s); @@ -151,4 +155,8 @@ void nbt_compound_clear(nbt_tag_t *compound); int nbt_compound_merge(nbt_tag_t *target, nbt_tag_t *srccomp); +/* Returned values are shared and statically allocated. Do NOT attempt to + * modify or free them! */ +const char *nbt_typestr(nbt_type_t type); + #endif -- cgit v1.2.3-70-g09d2