It isn't possible to use libxl__json_object_append_to() outside of
libxl_json.c as there is no way to allocate a struct libxl__yajl_ctx.
So also remove libxl__yajl_ctx typedef from the internal header.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
libxl__json_object *obj;
} libxl__json_map_node;
-typedef struct libxl__yajl_ctx libxl__yajl_ctx;
-
static inline bool libxl__json_object_is_null(const libxl__json_object *o)
{
return o != NULL && o->type == JSON_NULL;
*/
_hidden libxl__json_object *libxl__json_object_alloc(libxl__gc *gc_opt,
libxl__json_node_type type);
-_hidden int libxl__json_object_append_to(libxl__gc *gc_opt,
- libxl__json_object *obj,
- libxl__yajl_ctx *ctx);
_hidden libxl__json_object *libxl__json_array_get(const libxl__json_object *o,
int i);
_hidden
/* #define DEBUG_ANSWER */
-struct libxl__yajl_ctx {
+typedef struct libxl__yajl_ctx {
libxl__gc *gc;
yajl_handle hand;
libxl__json_object *head;
#ifdef DEBUG_ANSWER
yajl_gen g;
#endif
-};
+} libxl__yajl_ctx;
#ifdef DEBUG_ANSWER
#if YAJL_VERSION < 20000
return obj;
}
-int libxl__json_object_append_to(libxl__gc *gc, libxl__json_object *obj,
- libxl__yajl_ctx *ctx)
+static int libxl__json_object_append_to(libxl__gc *gc,
+ libxl__json_object *obj,
+ libxl__yajl_ctx *ctx)
{
libxl__json_object *dst = ctx->current;