[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl_internal.h: introduce libxl__json_object_get_number
commit d638671fa44f8c1c55205a127d3224e8cf39a549 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Tue May 13 22:53:57 2014 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed May 21 11:01:00 2014 +0100 libxl_internal.h: introduce libxl__json_object_get_number Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/libxl_internal.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 325d340..5974f00 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1696,6 +1696,14 @@ const char *libxl__json_object_get_string(const libxl__json_object *o) return NULL; } static inline +const char *libxl__json_object_get_number(const libxl__json_object *o) +{ + if (libxl__json_object_is_number(o)) + return o->u.string; + else + return NULL; +} +static inline flexarray_t *libxl__json_object_get_map(const libxl__json_object *o) { if (libxl__json_object_is_map(o)) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |