28 #ifndef HAVE_UBJS_COMMON 29 #define HAVE_UBJS_COMMON 38 #include "ubjs_exports.h" 83 #define MARKER_OPTIMIZE_COUNT 35 88 #define MARKER_OPTIMIZE_TYPE 36 93 #define MARKER_CHAR 67 98 #define MARKER_FLOAT64 68 103 #define MARKER_FALSE 70 108 #define MARKER_HPN 72 113 #define MARKER_INT16 73 118 #define MARKER_INT64 76 123 #define MARKER_NOOP 78 128 #define MARKER_STR 83 133 #define MARKER_TRUE 84 138 #define MARKER_UINT8 85 143 #define MARKER_NULL 90 148 #define MARKER_ARRAY_BEGIN 91 153 #define MARKER_ARRAY_END 93 158 #define MARKER_FLOAT32 100 163 #define MARKER_INT8 105 168 #define MARKER_INT32 108 173 #define MARKER_OBJECT_BEGIN 123 178 #define MARKER_OBJECT_END 125 188 typedef void *(*ubjs_library_alloc_f)(
unsigned int len);
UBJS_EXPORT ubjs_result ubjs_library_new_stdlib(ubjs_library **pthis)
Initializes the library handle using stdlib's malloc() and free().
Definition: ubjs_common.c:149
void(* ubjs_library_free_f)(void *ptr)
Deallocation functor.
Definition: ubjs_common.h:197
void *(* ubjs_library_alloc_f)(unsigned int len)
Allocation functor.
Definition: ubjs_common.h:188
ubjs_bool
Wrapper around regular C-like booleans.
Definition: ubjs_common.h:59
ubjs_result
Enum that defines the result of a method.
Definition: ubjs_common.h:73
Definition: ubjs_common.h:62
Definition: ubjs_common.h:76
UBJS_EXPORT ubjs_result ubjs_library_free(ubjs_library **pthis)
Deinitializes the library handle.
Definition: ubjs_common.c:154
Definition: ubjs_common.h:61
double float64_t
Typedef to have consistency in naming all int/float types.
Definition: ubjs_common.h:51
Definition: ubjs_common.h:75
UBJS_EXPORT ubjs_result ubjs_library_new(ubjs_library_alloc_f alloc, ubjs_library_free_f free, ubjs_library **pthis)
Initializes the library handle.
Definition: ubjs_common.c:132
float float32_t
Typedef to have consistency in naming all int/float types.
Definition: ubjs_common.h:45
struct ubjs_library ubjs_library
Library handle.
Definition: ubjs_common.h:203