diff options
Diffstat (limited to 'include/nbt.h')
| -rw-r--r-- | include/nbt.h | 10 |
1 files changed, 9 insertions, 1 deletions
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
|
