From 81eb86805c5fe2e59503e045994ad0d4b055156c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sat, 22 Oct 2016 17:06:41 -0400 Subject: [PATCH] Hide bt_values and bt_attributes in libbabeltrace-ctf MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- formats/ctf/ir/Makefile.am | 4 +- {lib => formats/ctf/ir}/ref.c | 0 {lib => formats/ctf/ir}/values.c | 50 +++++++++++ include/Makefile.am | 8 +- include/babeltrace/values.h | 142 +++++++++++++++++++++---------- lib/Makefile.am | 4 +- 6 files changed, 153 insertions(+), 55 deletions(-) rename {lib => formats/ctf/ir}/ref.c (100%) rename {lib => formats/ctf/ir}/values.c (98%) diff --git a/formats/ctf/ir/Makefile.am b/formats/ctf/ir/Makefile.am index b9048bc5..1b7b5d89 100644 --- a/formats/ctf/ir/Makefile.am +++ b/formats/ctf/ir/Makefile.am @@ -16,7 +16,9 @@ libctf_ir_la_SOURCES = \ trace.c \ utils.c \ resolve.c \ - validation.c + validation.c \ + values.c \ + ref.c libctf_ir_la_LIBADD = \ $(top_builddir)/lib/libbabeltrace.la diff --git a/lib/ref.c b/formats/ctf/ir/ref.c similarity index 100% rename from lib/ref.c rename to formats/ctf/ir/ref.c diff --git a/lib/values.c b/formats/ctf/ir/values.c similarity index 98% rename from lib/values.c rename to formats/ctf/ir/values.c index 5e7f55c6..61aa1522 100644 --- a/lib/values.c +++ b/formats/ctf/ir/values.c @@ -386,15 +386,18 @@ bool (* const compare_funcs[])(const struct bt_value *, [BT_VALUE_TYPE_MAP] = bt_value_map_compare, }; +BT_HIDDEN void bt_value_null_freeze(struct bt_value *object) { } +BT_HIDDEN void bt_value_generic_freeze(struct bt_value *object) { object->is_frozen = true; } +BT_HIDDEN void bt_value_array_freeze(struct bt_value *object) { int i; @@ -411,6 +414,7 @@ void bt_value_array_freeze(struct bt_value *object) bt_value_generic_freeze(object); } +BT_HIDDEN void bt_value_map_freeze(struct bt_value *object) { GHashTableIter iter; @@ -456,6 +460,7 @@ void bt_value_destroy(struct bt_object *obj) g_free(value); } +BT_HIDDEN enum bt_value_status bt_value_freeze(struct bt_value *object) { enum bt_value_status ret = BT_VALUE_STATUS_OK; @@ -471,11 +476,13 @@ end: return ret; } +BT_HIDDEN bool bt_value_is_frozen(const struct bt_value *object) { return object && object->is_frozen; } +BT_HIDDEN enum bt_value_type bt_value_get_type(const struct bt_value *object) { if (!object) { @@ -497,6 +504,7 @@ struct bt_value bt_value_create_base(enum bt_value_type type) return base; } +BT_HIDDEN struct bt_value *bt_value_bool_create_init(bool val) { struct bt_value_bool *bool_obj; @@ -514,11 +522,13 @@ end: return BT_VALUE_FROM_CONCRETE(bool_obj); } +BT_HIDDEN struct bt_value *bt_value_bool_create(void) { return bt_value_bool_create_init(false); } +BT_HIDDEN struct bt_value *bt_value_integer_create_init(int64_t val) { struct bt_value_integer *integer_obj; @@ -536,11 +546,13 @@ end: return BT_VALUE_FROM_CONCRETE(integer_obj); } +BT_HIDDEN struct bt_value *bt_value_integer_create(void) { return bt_value_integer_create_init(0); } +BT_HIDDEN struct bt_value *bt_value_float_create_init(double val) { struct bt_value_float *float_obj; @@ -558,11 +570,13 @@ end: return BT_VALUE_FROM_CONCRETE(float_obj); } +BT_HIDDEN struct bt_value *bt_value_float_create(void) { return bt_value_float_create_init(0.); } +BT_HIDDEN struct bt_value *bt_value_string_create_init(const char *val) { struct bt_value_string *string_obj = NULL; @@ -590,11 +604,13 @@ end: return BT_VALUE_FROM_CONCRETE(string_obj); } +BT_HIDDEN struct bt_value *bt_value_string_create(void) { return bt_value_string_create_init(""); } +BT_HIDDEN struct bt_value *bt_value_array_create(void) { struct bt_value_array *array_obj; @@ -619,6 +635,7 @@ end: return BT_VALUE_FROM_CONCRETE(array_obj); } +BT_HIDDEN struct bt_value *bt_value_map_create(void) { struct bt_value_map *map_obj; @@ -643,6 +660,7 @@ end: return BT_VALUE_FROM_CONCRETE(map_obj); } +BT_HIDDEN enum bt_value_status bt_value_bool_get(const struct bt_value *bool_obj, bool *val) { @@ -660,6 +678,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_bool_set(struct bt_value *bool_obj, bool val) { enum bt_value_status ret = BT_VALUE_STATUS_OK; @@ -681,6 +700,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_integer_get(const struct bt_value *integer_obj, int64_t *val) { @@ -699,6 +719,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_integer_set(struct bt_value *integer_obj, int64_t val) { @@ -722,6 +743,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_float_get(const struct bt_value *float_obj, double *val) { @@ -740,6 +762,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_float_set(struct bt_value *float_obj, double val) { @@ -763,6 +786,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_string_get(const struct bt_value *string_obj, const char **val) { @@ -781,6 +805,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_string_set(struct bt_value *string_obj, const char *val) { @@ -804,6 +829,7 @@ end: return ret; } +BT_HIDDEN int bt_value_array_size(const struct bt_value *array_obj) { int ret; @@ -821,11 +847,13 @@ end: return ret; } +BT_HIDDEN bool bt_value_array_is_empty(const struct bt_value *array_obj) { return bt_value_array_size(array_obj) == 0; } +BT_HIDDEN struct bt_value *bt_value_array_get(const struct bt_value *array_obj, size_t index) { @@ -846,6 +874,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_array_append(struct bt_value *array_obj, struct bt_value *element_obj) { @@ -870,6 +899,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_array_append_bool(struct bt_value *array_obj, bool val) { @@ -883,6 +913,7 @@ enum bt_value_status bt_value_array_append_bool(struct bt_value *array_obj, return ret; } +BT_HIDDEN enum bt_value_status bt_value_array_append_integer( struct bt_value *array_obj, int64_t val) { @@ -896,6 +927,7 @@ enum bt_value_status bt_value_array_append_integer( return ret; } +BT_HIDDEN enum bt_value_status bt_value_array_append_float(struct bt_value *array_obj, double val) { @@ -909,6 +941,7 @@ enum bt_value_status bt_value_array_append_float(struct bt_value *array_obj, return ret; } +BT_HIDDEN enum bt_value_status bt_value_array_append_string(struct bt_value *array_obj, const char *val) { @@ -922,6 +955,7 @@ enum bt_value_status bt_value_array_append_string(struct bt_value *array_obj, return ret; } +BT_HIDDEN enum bt_value_status bt_value_array_append_empty_array( struct bt_value *array_obj) { @@ -935,6 +969,7 @@ enum bt_value_status bt_value_array_append_empty_array( return ret; } +BT_HIDDEN enum bt_value_status bt_value_array_append_empty_map(struct bt_value *array_obj) { enum bt_value_status ret; @@ -947,6 +982,7 @@ enum bt_value_status bt_value_array_append_empty_map(struct bt_value *array_obj) return ret; } +BT_HIDDEN enum bt_value_status bt_value_array_set(struct bt_value *array_obj, size_t index, struct bt_value *element_obj) { @@ -973,6 +1009,7 @@ end: return ret; } +BT_HIDDEN int bt_value_map_size(const struct bt_value *map_obj) { int ret; @@ -989,11 +1026,13 @@ end: return ret; } +BT_HIDDEN bool bt_value_map_is_empty(const struct bt_value *map_obj) { return bt_value_map_size(map_obj) == 0; } +BT_HIDDEN struct bt_value *bt_value_map_get(const struct bt_value *map_obj, const char *key) { @@ -1017,6 +1056,7 @@ end: return ret; } +BT_HIDDEN bool bt_value_map_has_key(const struct bt_value *map_obj, const char *key) { bool ret; @@ -1036,6 +1076,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_map_insert(struct bt_value *map_obj, const char *key, struct bt_value *element_obj) { @@ -1062,6 +1103,7 @@ end: return ret; } +BT_HIDDEN enum bt_value_status bt_value_map_insert_bool(struct bt_value *map_obj, const char *key, bool val) { @@ -1075,6 +1117,7 @@ enum bt_value_status bt_value_map_insert_bool(struct bt_value *map_obj, return ret; } +BT_HIDDEN enum bt_value_status bt_value_map_insert_integer(struct bt_value *map_obj, const char *key, int64_t val) { @@ -1088,6 +1131,7 @@ enum bt_value_status bt_value_map_insert_integer(struct bt_value *map_obj, return ret; } +BT_HIDDEN enum bt_value_status bt_value_map_insert_float(struct bt_value *map_obj, const char *key, double val) { @@ -1101,6 +1145,7 @@ enum bt_value_status bt_value_map_insert_float(struct bt_value *map_obj, return ret; } +BT_HIDDEN enum bt_value_status bt_value_map_insert_string(struct bt_value *map_obj, const char *key, const char *val) { @@ -1114,6 +1159,7 @@ enum bt_value_status bt_value_map_insert_string(struct bt_value *map_obj, return ret; } +BT_HIDDEN enum bt_value_status bt_value_map_insert_empty_array(struct bt_value *map_obj, const char *key) { @@ -1127,6 +1173,7 @@ enum bt_value_status bt_value_map_insert_empty_array(struct bt_value *map_obj, return ret; } +BT_HIDDEN enum bt_value_status bt_value_map_insert_empty_map(struct bt_value *map_obj, const char *key) { @@ -1140,6 +1187,7 @@ enum bt_value_status bt_value_map_insert_empty_map(struct bt_value *map_obj, return ret; } +BT_HIDDEN enum bt_value_status bt_value_map_foreach(const struct bt_value *map_obj, bt_value_map_foreach_cb cb, void *data) { @@ -1168,6 +1216,7 @@ end: return ret; } +BT_HIDDEN struct bt_value *bt_value_copy(const struct bt_value *object) { struct bt_value *copy_obj = NULL; @@ -1182,6 +1231,7 @@ end: return copy_obj; } +BT_HIDDEN bool bt_value_compare(const struct bt_value *object_a, const struct bt_value *object_b) { diff --git a/include/Makefile.am b/include/Makefile.am index fcbd6a3d..b6905cf6 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -5,9 +5,7 @@ babeltraceinclude_HEADERS = \ babeltrace/iterator.h \ babeltrace/trace-handle.h \ babeltrace/list.h \ - babeltrace/clock-types.h \ - babeltrace/values.h \ - babeltrace/ref.h + babeltrace/clock-types.h babeltracectfinclude_HEADERS = \ babeltrace/ctf/events.h \ @@ -92,4 +90,6 @@ noinst_HEADERS = \ babeltrace/compat/stdio.h \ babeltrace/compat/mman.h \ babeltrace/endian.h \ - babeltrace/mmap-align.h + babeltrace/mmap-align.h \ + babeltrace/values.h \ + babeltrace/ref.h diff --git a/include/babeltrace/values.h b/include/babeltrace/values.h index e13cc202..31b2e2a0 100644 --- a/include/babeltrace/values.h +++ b/include/babeltrace/values.h @@ -75,6 +75,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -152,7 +153,8 @@ struct bt_value; * null value object (of type #BT_VALUE_TYPE_NULL), whereas \c NULL * means an error of some sort. */ -extern struct bt_value *bt_value_null; +BT_HIDDEN +struct bt_value *bt_value_null; /** * User function type for bt_value_map_foreach(). @@ -185,7 +187,8 @@ typedef bool (* bt_value_map_foreach_cb)(const char *key, * * @see bt_value_is_frozen() */ -extern enum bt_value_status bt_value_freeze(struct bt_value *object); +BT_HIDDEN +enum bt_value_status bt_value_freeze(struct bt_value *object); /** * Checks whether \p object is frozen or not. @@ -195,7 +198,8 @@ extern enum bt_value_status bt_value_freeze(struct bt_value *object); * * @see bt_value_freeze() */ -extern bool bt_value_is_frozen(const struct bt_value *object); +BT_HIDDEN +bool bt_value_is_frozen(const struct bt_value *object); /** * Returns the type of \p object. @@ -213,7 +217,8 @@ extern bool bt_value_is_frozen(const struct bt_value *object); * @see bt_value_is_array() * @see bt_value_is_map() */ -extern enum bt_value_type bt_value_get_type(const struct bt_value *object); +BT_HIDDEN +enum bt_value_type bt_value_get_type(const struct bt_value *object); /** * Checks whether \p object is a null value object. The only valid null @@ -326,7 +331,8 @@ bool bt_value_is_map(const struct bt_value *object) * @see bt_value_bool_create_init() (creates an initialized * boolean value object) */ -extern struct bt_value *bt_value_bool_create(void); +BT_HIDDEN +struct bt_value *bt_value_bool_create(void); /** * Creates a boolean value object with its initial raw value set to @@ -337,7 +343,8 @@ extern struct bt_value *bt_value_bool_create(void); * @param val Initial raw value * @returns Created value object on success, or \c NULL on error */ -extern struct bt_value *bt_value_bool_create_init(bool val); +BT_HIDDEN +struct bt_value *bt_value_bool_create_init(bool val); /** * Creates an integer value object. The created integer value object's @@ -350,7 +357,8 @@ extern struct bt_value *bt_value_bool_create_init(bool val); * @see bt_value_integer_create_init() (creates an initialized * integer value object) */ -extern struct bt_value *bt_value_integer_create(void); +BT_HIDDEN +struct bt_value *bt_value_integer_create(void); /** * Creates an integer value object with its initial raw value set to @@ -361,7 +369,8 @@ extern struct bt_value *bt_value_integer_create(void); * @param val Initial raw value * @returns Created value object on success, or \c NULL on error */ -extern struct bt_value *bt_value_integer_create_init(int64_t val); +BT_HIDDEN +struct bt_value *bt_value_integer_create_init(int64_t val); /** * Creates a floating point number value object. The created floating @@ -374,7 +383,8 @@ extern struct bt_value *bt_value_integer_create_init(int64_t val); * @see bt_value_float_create_init() (creates an initialized floating * point number value object) */ -extern struct bt_value *bt_value_float_create(void); +BT_HIDDEN +struct bt_value *bt_value_float_create(void); /** * Creates a floating point number value object with its initial raw @@ -385,7 +395,8 @@ extern struct bt_value *bt_value_float_create(void); * @param val Initial raw value * @returns Created value object on success, or \c NULL on error */ -extern struct bt_value *bt_value_float_create_init(double val); +BT_HIDDEN +struct bt_value *bt_value_float_create_init(double val); /** * Creates a string value object. The string value object is initially @@ -398,7 +409,8 @@ extern struct bt_value *bt_value_float_create_init(double val); * @see bt_value_string_create_init() (creates an initialized * string value object) */ -extern struct bt_value *bt_value_string_create(void); +BT_HIDDEN +struct bt_value *bt_value_string_create(void); /** * Creates a string value object with its initial raw value set to @@ -411,7 +423,8 @@ extern struct bt_value *bt_value_string_create(void); * @param val Initial raw value (copied on success) * @returns Created value object on success, or \c NULL on error */ -extern struct bt_value *bt_value_string_create_init(const char *val); +BT_HIDDEN +struct bt_value *bt_value_string_create_init(const char *val); /** * Creates an empty array value object. @@ -420,7 +433,8 @@ extern struct bt_value *bt_value_string_create_init(const char *val); * * @returns Created value object on success, or \c NULL on error */ -extern struct bt_value *bt_value_array_create(void); +BT_HIDDEN +struct bt_value *bt_value_array_create(void); /** * Creates an empty map value object. @@ -429,7 +443,8 @@ extern struct bt_value *bt_value_array_create(void); * * @returns Created value object on success, or \c NULL on error */ -extern struct bt_value *bt_value_map_create(void); +BT_HIDDEN +struct bt_value *bt_value_map_create(void); /** * Gets the boolean raw value of the boolean value object \p bool_obj. @@ -440,7 +455,8 @@ extern struct bt_value *bt_value_map_create(void); * * @see bt_value_bool_set() */ -extern enum bt_value_status bt_value_bool_get( +BT_HIDDEN +enum bt_value_status bt_value_bool_get( const struct bt_value *bool_obj, bool *val); /** @@ -453,7 +469,8 @@ extern enum bt_value_status bt_value_bool_get( * * @see bt_value_bool_get() */ -extern enum bt_value_status bt_value_bool_set(struct bt_value *bool_obj, +BT_HIDDEN +enum bt_value_status bt_value_bool_set(struct bt_value *bool_obj, bool val); /** @@ -466,7 +483,8 @@ extern enum bt_value_status bt_value_bool_set(struct bt_value *bool_obj, * * @see bt_value_integer_set() */ -extern enum bt_value_status bt_value_integer_get( +BT_HIDDEN +enum bt_value_status bt_value_integer_get( const struct bt_value *integer_obj, int64_t *val); /** @@ -479,7 +497,8 @@ extern enum bt_value_status bt_value_integer_get( * * @see bt_value_integer_get() */ -extern enum bt_value_status bt_value_integer_set( +BT_HIDDEN +enum bt_value_status bt_value_integer_set( struct bt_value *integer_obj, int64_t val); /** @@ -492,7 +511,8 @@ extern enum bt_value_status bt_value_integer_set( * * @see bt_value_float_set() */ -extern enum bt_value_status bt_value_float_get( +BT_HIDDEN +enum bt_value_status bt_value_float_get( const struct bt_value *float_obj, double *val); /** @@ -505,7 +525,8 @@ extern enum bt_value_status bt_value_float_get( * * @see bt_value_float_get() */ -extern enum bt_value_status bt_value_float_set( +BT_HIDDEN +enum bt_value_status bt_value_float_set( struct bt_value *float_obj, double val); /** @@ -520,7 +541,8 @@ extern enum bt_value_status bt_value_float_set( * * @see bt_value_string_set() */ -extern enum bt_value_status bt_value_string_get( +BT_HIDDEN +enum bt_value_status bt_value_string_get( const struct bt_value *string_obj, const char **val); /** @@ -535,7 +557,8 @@ extern enum bt_value_status bt_value_string_get( * * @see bt_value_string_get() */ -extern enum bt_value_status bt_value_string_set(struct bt_value *string_obj, +BT_HIDDEN +enum bt_value_status bt_value_string_set(struct bt_value *string_obj, const char *val); /** @@ -549,7 +572,8 @@ extern enum bt_value_status bt_value_string_set(struct bt_value *string_obj, * * @see bt_value_array_is_empty() */ -extern int bt_value_array_size(const struct bt_value *array_obj); +BT_HIDDEN +int bt_value_array_size(const struct bt_value *array_obj); /** * Returns \c true if the array value object \p array_obj is empty. @@ -559,7 +583,8 @@ extern int bt_value_array_size(const struct bt_value *array_obj); * * @see bt_value_array_size() */ -extern bool bt_value_array_is_empty(const struct bt_value *array_obj); +BT_HIDDEN +bool bt_value_array_is_empty(const struct bt_value *array_obj); /** * Gets the value object of the array value object \p array_obj at the @@ -573,7 +598,8 @@ extern bool bt_value_array_is_empty(const struct bt_value *array_obj); * @returns Value object at index \p index on * success, or \c NULL on error */ -extern struct bt_value *bt_value_array_get(const struct bt_value *array_obj, +BT_HIDDEN +struct bt_value *bt_value_array_get(const struct bt_value *array_obj, size_t index); /** @@ -594,7 +620,8 @@ extern struct bt_value *bt_value_array_get(const struct bt_value *array_obj, * @see bt_value_array_append_empty_array() * @see bt_value_array_append_empty_map() */ -extern enum bt_value_status bt_value_array_append(struct bt_value *array_obj, +BT_HIDDEN +enum bt_value_status bt_value_array_append(struct bt_value *array_obj, struct bt_value *element_obj); /** @@ -610,7 +637,8 @@ extern enum bt_value_status bt_value_array_append(struct bt_value *array_obj, * * @see bt_value_array_append() */ -extern enum bt_value_status bt_value_array_append_bool( +BT_HIDDEN +enum bt_value_status bt_value_array_append_bool( struct bt_value *array_obj, bool val); /** @@ -626,7 +654,8 @@ extern enum bt_value_status bt_value_array_append_bool( * * @see bt_value_array_append() */ -extern enum bt_value_status bt_value_array_append_integer( +BT_HIDDEN +enum bt_value_status bt_value_array_append_integer( struct bt_value *array_obj, int64_t val); /** @@ -643,7 +672,8 @@ extern enum bt_value_status bt_value_array_append_integer( * * @see bt_value_array_append() */ -extern enum bt_value_status bt_value_array_append_float( +BT_HIDDEN +enum bt_value_status bt_value_array_append_float( struct bt_value *array_obj, double val); /** @@ -661,7 +691,8 @@ extern enum bt_value_status bt_value_array_append_float( * * @see bt_value_array_append() */ -extern enum bt_value_status bt_value_array_append_string( +BT_HIDDEN +enum bt_value_status bt_value_array_append_string( struct bt_value *array_obj, const char *val); /** @@ -676,7 +707,8 @@ extern enum bt_value_status bt_value_array_append_string( * * @see bt_value_array_append() */ -extern enum bt_value_status bt_value_array_append_empty_array( +BT_HIDDEN +enum bt_value_status bt_value_array_append_empty_array( struct bt_value *array_obj); /** @@ -691,7 +723,8 @@ extern enum bt_value_status bt_value_array_append_empty_array( * * @see bt_value_array_append() */ -extern enum bt_value_status bt_value_array_append_empty_map( +BT_HIDDEN +enum bt_value_status bt_value_array_append_empty_map( struct bt_value *array_obj); /** @@ -708,7 +741,8 @@ extern enum bt_value_status bt_value_array_append_empty_map( * \p array_obj * @returns One of #bt_value_status values */ -extern enum bt_value_status bt_value_array_set(struct bt_value *array_obj, +BT_HIDDEN +enum bt_value_status bt_value_array_set(struct bt_value *array_obj, size_t index, struct bt_value *element_obj); /** @@ -722,7 +756,8 @@ extern enum bt_value_status bt_value_array_set(struct bt_value *array_obj, * * @see bt_value_map_is_empty() */ -extern int bt_value_map_size(const struct bt_value *map_obj); +BT_HIDDEN +int bt_value_map_size(const struct bt_value *map_obj); /** * Returns \c true if the map value object \p map_obj is empty. @@ -732,7 +767,8 @@ extern int bt_value_map_size(const struct bt_value *map_obj); * * @see bt_value_map_size() */ -extern bool bt_value_map_is_empty(const struct bt_value *map_obj); +BT_HIDDEN +bool bt_value_map_is_empty(const struct bt_value *map_obj); /** * Gets the value object associated with the key \p key within the @@ -746,7 +782,8 @@ extern bool bt_value_map_is_empty(const struct bt_value *map_obj); * @returns Value object associated with the key \p key * on success, or \c NULL on error */ -extern struct bt_value *bt_value_map_get(const struct bt_value *map_obj, +BT_HIDDEN +struct bt_value *bt_value_map_get(const struct bt_value *map_obj, const char *key); /** @@ -771,7 +808,8 @@ extern struct bt_value *bt_value_map_get(const struct bt_value *map_obj, * returned if the loop was cancelled by the user * function */ -extern enum bt_value_status bt_value_map_foreach( +BT_HIDDEN +enum bt_value_status bt_value_map_foreach( const struct bt_value *map_obj, bt_value_map_foreach_cb cb, void *data); @@ -785,7 +823,8 @@ extern enum bt_value_status bt_value_map_foreach( * or \c false if it doesn't have \p key or * on error */ -extern bool bt_value_map_has_key(const struct bt_value *map_obj, +BT_HIDDEN +bool bt_value_map_has_key(const struct bt_value *map_obj, const char *key); /** @@ -812,7 +851,8 @@ extern bool bt_value_map_has_key(const struct bt_value *map_obj, * @see bt_value_map_insert_empty_array() * @see bt_value_map_insert_empty_map() */ -extern enum bt_value_status bt_value_map_insert( +BT_HIDDEN +enum bt_value_status bt_value_map_insert( struct bt_value *map_obj, const char *key, struct bt_value *element_obj); @@ -835,7 +875,8 @@ extern enum bt_value_status bt_value_map_insert( * * @see bt_value_map_insert() */ -extern enum bt_value_status bt_value_map_insert_bool( +BT_HIDDEN +enum bt_value_status bt_value_map_insert_bool( struct bt_value *map_obj, const char *key, bool val); /** @@ -856,7 +897,8 @@ extern enum bt_value_status bt_value_map_insert_bool( * * @see bt_value_map_insert() */ -extern enum bt_value_status bt_value_map_insert_integer( +BT_HIDDEN +enum bt_value_status bt_value_map_insert_integer( struct bt_value *map_obj, const char *key, int64_t val); /** @@ -879,7 +921,8 @@ extern enum bt_value_status bt_value_map_insert_integer( * * @see bt_value_map_insert() */ -extern enum bt_value_status bt_value_map_insert_float( +BT_HIDDEN +enum bt_value_status bt_value_map_insert_float( struct bt_value *map_obj, const char *key, double val); /** @@ -900,7 +943,8 @@ extern enum bt_value_status bt_value_map_insert_float( * * @see bt_value_map_insert() */ -extern enum bt_value_status bt_value_map_insert_string( +BT_HIDDEN +enum bt_value_status bt_value_map_insert_string( struct bt_value *map_obj, const char *key, const char *val); /** @@ -919,7 +963,8 @@ extern enum bt_value_status bt_value_map_insert_string( * * @see bt_value_map_insert() */ -extern enum bt_value_status bt_value_map_insert_empty_array( +BT_HIDDEN +enum bt_value_status bt_value_map_insert_empty_array( struct bt_value *map_obj, const char *key); /** @@ -938,7 +983,8 @@ extern enum bt_value_status bt_value_map_insert_empty_array( * * @see bt_value_map_insert() */ -extern enum bt_value_status bt_value_map_insert_empty_map( +BT_HIDDEN +enum bt_value_status bt_value_map_insert_empty_map( struct bt_value *map_obj, const char *key); /** @@ -954,7 +1000,8 @@ extern enum bt_value_status bt_value_map_insert_empty_map( * @returns Deep copy of \p object on success, or \c NULL * on error */ -extern struct bt_value *bt_value_copy(const struct bt_value *object); +BT_HIDDEN +struct bt_value *bt_value_copy(const struct bt_value *object); /** * Compares the value objects \p object_a and \p object_b and returns @@ -966,7 +1013,8 @@ extern struct bt_value *bt_value_copy(const struct bt_value *object); * same content, or \c false if they differ or on * error */ -extern bool bt_value_compare(const struct bt_value *object_a, +BT_HIDDEN +bool bt_value_compare(const struct bt_value *object_a, const struct bt_value *object_b); #ifdef __cplusplus diff --git a/lib/Makefile.am b/lib/Makefile.am index 8096d789..007abb78 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -9,9 +9,7 @@ libbabeltrace_la_SOURCES = babeltrace.c \ context.c \ trace-handle.c \ trace-collection.c \ - registry.c \ - values.c \ - ref.c + registry.c libbabeltrace_la_LDFLAGS = -version-info $(BABELTRACE_LIBRARY_VERSION) -- 2.34.1