[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v8 3/8] libxl: clean up namespace violation
In 752f181f ("libxl_json: introduce parser functions for builtin types") a bunch of parser functions were introduced. Unfortunately they polluted the public namespace with a prefix "libxl_", while they should be internal functions. This patch changes the prefix to "libxl__". No functional change introduced. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxl/libxl_cpuid.c | 6 +++--- tools/libxl/libxl_internal.h | 36 ++++++++++++++++++------------------ tools/libxl/libxl_json.c | 26 +++++++++++++------------- tools/libxl/libxl_nocpuid.c | 6 +++--- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/tools/libxl/libxl_cpuid.c b/tools/libxl/libxl_cpuid.c index 1f2bcd5..30c9ec3 100644 --- a/tools/libxl/libxl_cpuid.c +++ b/tools/libxl/libxl_cpuid.c @@ -398,9 +398,9 @@ out: return s; } -int libxl_cpuid_policy_list_parse_json(libxl__gc *gc, - const libxl__json_object *o, - libxl_cpuid_policy_list *p) +int libxl__cpuid_policy_list_parse_json(libxl__gc *gc, + const libxl__json_object *o, + libxl_cpuid_policy_list *p) { int i, size; libxl_cpuid_policy_list l; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 2a8f552..9e8bc4c 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -3153,26 +3153,26 @@ static inline int libxl__defbool_is_default(libxl_defbool *db) */ #define CTYPE(isfoo,c) (isfoo((unsigned char)(c))) -int libxl_defbool_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_defbool *p); +int libxl__defbool_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_defbool *p); int libxl__bool_parse_json(libxl__gc *gc, const libxl__json_object *o, bool *p); -int libxl_mac_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_mac *p); -int libxl_bitmap_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_bitmap *p); -int libxl_uuid_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_uuid *p); -int libxl_cpuid_policy_list_parse_json(libxl__gc *gc, - const libxl__json_object *o, - libxl_cpuid_policy_list *p); -int libxl_string_list_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_string_list *p); -int libxl_key_value_list_parse_json(libxl__gc *gc, - const libxl__json_object *o, - libxl_key_value_list *p); -int libxl_hwcap_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_hwcap *p); +int libxl__mac_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_mac *p); +int libxl__bitmap_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_bitmap *p); +int libxl__uuid_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_uuid *p); +int libxl__cpuid_policy_list_parse_json(libxl__gc *gc, + const libxl__json_object *o, + libxl_cpuid_policy_list *p); +int libxl__string_list_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_string_list *p); +int libxl__key_value_list_parse_json(libxl__gc *gc, + const libxl__json_object *o, + libxl_key_value_list *p); +int libxl__hwcap_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_hwcap *p); int libxl__int_parse_json(libxl__gc *gc, const libxl__json_object *o, void *p); int libxl__uint8_parse_json(libxl__gc *gc, const libxl__json_object *o, diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c index fb9baf8..dd0d73e 100644 --- a/tools/libxl/libxl_json.c +++ b/tools/libxl/libxl_json.c @@ -100,8 +100,8 @@ yajl_gen_status libxl_defbool_gen_json(yajl_gen hand, return libxl__yajl_gen_asciiz(hand, libxl_defbool_to_string(*db)); } -int libxl_defbool_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_defbool *p) +int libxl__defbool_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_defbool *p) { const char *s; @@ -144,8 +144,8 @@ yajl_gen_status libxl_uuid_gen_json(yajl_gen hand, return yajl_gen_string(hand, (const unsigned char *)buf, LIBXL_UUID_FMTLEN); } -int libxl_uuid_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_uuid *p) +int libxl__uuid_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_uuid *p) { if (!libxl__json_object_is_string(o)) return ERROR_FAIL; @@ -173,7 +173,7 @@ out: return s; } -int libxl_bitmap_parse_json(libxl__gc *gc, const libxl__json_object *o, +int libxl__bitmap_parse_json(libxl__gc *gc, const libxl__json_object *o, libxl_bitmap *p) { int i; @@ -234,8 +234,8 @@ out: return s; } -int libxl_key_value_list_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_key_value_list *p) +int libxl__key_value_list_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_key_value_list *p) { libxl__json_map_node *node = NULL; flexarray_t *maps = NULL; @@ -290,8 +290,8 @@ out: return s; } -int libxl_string_list_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_string_list *p) +int libxl__string_list_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_string_list *p) { const libxl__json_object *t; libxl_string_list l; @@ -329,8 +329,8 @@ yajl_gen_status libxl_mac_gen_json(yajl_gen hand, libxl_mac *mac) return yajl_gen_string(hand, (const unsigned char *)buf, LIBXL_MAC_FMTLEN); } -int libxl_mac_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_mac *p) +int libxl__mac_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_mac *p) { if (!libxl__json_object_is_string(o)) return ERROR_FAIL; @@ -356,8 +356,8 @@ out: return s; } -int libxl_hwcap_parse_json(libxl__gc *gc, const libxl__json_object *o, - libxl_hwcap *p) +int libxl__hwcap_parse_json(libxl__gc *gc, const libxl__json_object *o, + libxl_hwcap *p) { int i; diff --git a/tools/libxl/libxl_nocpuid.c b/tools/libxl/libxl_nocpuid.c index eb525fc..e98906a 100644 --- a/tools/libxl/libxl_nocpuid.c +++ b/tools/libxl/libxl_nocpuid.c @@ -44,9 +44,9 @@ yajl_gen_status libxl_cpuid_policy_list_gen_json(yajl_gen hand, return 0; } -int libxl_cpuid_policy_list_parse_json(libxl__gc *gc, - const libxl__json_object *o, - libxl_cpuid_policy_list *p) +int libxl__cpuid_policy_list_parse_json(libxl__gc *gc, + const libxl__json_object *o, + libxl_cpuid_policy_list *p) { return 0; } -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |