search for: cleanup_yajl_tree_free

Displaying 6 results from an estimated 6 matches for "cleanup_yajl_tree_free".

2017 Nov 23
1
Re: [PATCH 1/1] Switch from YAJL to Jansson
...;sys/resource.h> > #endif > >-#include <yajl/yajl_tree.h> >+#include <jansson.h> > > #include "guestfs.h" > #include "guestfs-internal.h" > #include "guestfs-internal-actions.h" > > #ifdef HAVE_ATTRIBUTE_CLEANUP >-#define CLEANUP_YAJL_TREE_FREE __attribute__((cleanup(cleanup_yajl_tree_free))) >+#define CLEANUP_JSON_T_DECREF __attribute__((cleanup(cleanup_json_t_decref))) > > static void >-cleanup_yajl_tree_free (void *ptr) >+cleanup_json_t_decref (void *ptr) > { >- yajl_tree_free (* (yajl_val *) ptr); >+ json_dec...
2016 Jan 09
0
[PATCH] build: Require qemu >= 1.3.0 and yajl.
...h_parser (guestfs_h *g); -static char *get_disk_format (guestfs_h *g, const char *filename); -static int64_t get_disk_virtual_size (guestfs_h *g, const char *filename); -static int get_disk_has_backing_file (guestfs_h *g, const char *filename); -#if HAVE_YAJL +#ifdef HAVE_ATTRIBUTE_CLEANUP +#define CLEANUP_YAJL_TREE_FREE __attribute__((cleanup(cleanup_yajl_tree_free))) + +static void +cleanup_yajl_tree_free (void *ptr) +{ + yajl_tree_free (* (yajl_val *) ptr); +} + +#else +#define CLEANUP_YAJL_TREE_FREE +#endif + static yajl_val get_json_output (guestfs_h *g, const char *filename); -#endif -static char *old_parse...
2017 Nov 23
4
[PATCH 0/1] RFC: switch from YAJL to Jansson
Hi, recently, there was a discussion in the development list of libvirt on switching to a different JSON library than YAJL [1]. Since we use YAJL, and the points there IMHO apply to libguestfs as well, I decided to give a try in switching to Jansson [2]. The result IMHO is nice, with the additional APIs of Jansson that simplify some of our code. Unlike with YAJL, I did not set a minimum
2018 Feb 12
0
[PATCH v2 1/1] Switch from YAJL to Jansson
.../info.c @@ -37,53 +37,46 @@ #include <sys/resource.h> #endif -#include <yajl/yajl_tree.h> +#include <jansson.h> #include "guestfs.h" #include "guestfs-internal.h" #include "guestfs-internal-actions.h" #ifdef HAVE_ATTRIBUTE_CLEANUP -#define CLEANUP_YAJL_TREE_FREE __attribute__((cleanup(cleanup_yajl_tree_free))) +#define CLEANUP_JSON_T_DECREF __attribute__((cleanup(cleanup_json_t_decref))) static void -cleanup_yajl_tree_free (void *ptr) +cleanup_json_t_decref (void *ptr) { - yajl_tree_free (* (yajl_val *) ptr); + json_decref (* (json_t **) ptr); }...
2017 Nov 23
0
[PATCH 1/1] Switch from YAJL to Jansson
.../info.c @@ -38,53 +38,46 @@ #include <sys/resource.h> #endif -#include <yajl/yajl_tree.h> +#include <jansson.h> #include "guestfs.h" #include "guestfs-internal.h" #include "guestfs-internal-actions.h" #ifdef HAVE_ATTRIBUTE_CLEANUP -#define CLEANUP_YAJL_TREE_FREE __attribute__((cleanup(cleanup_yajl_tree_free))) +#define CLEANUP_JSON_T_DECREF __attribute__((cleanup(cleanup_json_t_decref))) static void -cleanup_yajl_tree_free (void *ptr) +cleanup_json_t_decref (void *ptr) { - yajl_tree_free (* (yajl_val *) ptr); + json_decref (* (json_t **) ptr); }...
2018 Feb 12
2
[PATCH v2 0/1] RFC: switch from YAJL to Jansson
Hi, recently, there was a discussion in the development list of libvirt on switching to a different JSON library than YAJL [1]. Since we use YAJL, and the points there IMHO apply to libguestfs as well, I decided to give a try in switching to Jansson [2]. The result IMHO is nice, with the additional APIs of Jansson that simplify some of our code. Unlike with YAJL, I did not set a minimum