[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] libxl_json: Remove libxl__json_object_append_to from header



commit 60351caf90494f7e74ae767b5a09471ae9bbbd60
Author:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Fri Jan 4 13:53:21 2019 +0000
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri Jan 11 14:57:52 2019 +0000

    libxl_json: Remove libxl__json_object_append_to from header
    
    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@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_internal.h | 5 -----
 tools/libxl/libxl_json.c     | 9 +++++----
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index c21d475102..bf3b85b013 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -2071,8 +2071,6 @@ typedef struct {
     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;
@@ -2159,9 +2157,6 @@ static inline long long 
libxl__json_object_get_integer(const libxl__json_object
  */
 _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
diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c
index cd78313df2..9b8ef2cab9 100644
--- a/tools/libxl/libxl_json.c
+++ b/tools/libxl/libxl_json.c
@@ -23,7 +23,7 @@
 
 /* #define DEBUG_ANSWER */
 
-struct libxl__yajl_ctx {
+typedef struct libxl__yajl_ctx {
     libxl__gc *gc;
     yajl_handle hand;
     libxl__json_object *head;
@@ -31,7 +31,7 @@ struct libxl__yajl_ctx {
 #ifdef DEBUG_ANSWER
     yajl_gen g;
 #endif
-};
+} libxl__yajl_ctx;
 
 #ifdef DEBUG_ANSWER
 #if YAJL_VERSION < 20000
@@ -463,8 +463,9 @@ libxl__json_object *libxl__json_object_alloc(libxl__gc *gc,
     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;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.