]> git.bts.cx Git - benzene.git/blob - src/bz/types/identifier_internal.h
Fixed Aseprite rendering system
[benzene.git] / src / bz / types / identifier_internal.h
1 #ifndef BZ_TYPES_IDENTIFIER_INTERNAL_H
2 #define BZ_TYPES_IDENTIFIER_INTERNAL_H
3
4 #include <bz/types/identifier.h>
5
6 #include <stb_sprintf.h>
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 #define bzInsertIdentifier(dst, fmt) \
13 { \
14 va_list args; \
15 va_start(args, fmt); \
16 stbsp_vsnprintf(dst, kBZMaxIdentifierLength, fmt, args); \
17 va_end(args); \
18 }
19
20 #define bzMakeIdentifier(out, fmt) \
21 static char out[kBZMaxIdentifierLength]; \
22 bzInsertIdentifier(out, fmt);
23
24 #ifdef __cplusplus
25 }
26 #endif
27
28 #endif