diff options
| author | 2024-02-10 14:28:38 -0500 | |
|---|---|---|
| committer | 2024-02-10 14:28:38 -0500 | |
| commit | 4b3a61106a7d38cd904ab021b82a4a487df61f0a (patch) | |
| tree | b804ac19578a07ed62f2d664d89f0a080a7ad23f /include | |
| parent | add lists (diff) | |
changes
Diffstat (limited to 'include')
| -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
|
