From 251e457f4be15a6a9841b22a70eeb9b8da58f60e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 5 Mar 2015 17:32:10 -0500 Subject: [PATCH] Remove alias getter from IR field interface MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- formats/ctf/ir/event-types.c | 17 ----------------- .../babeltrace/ctf-ir/event-types-internal.h | 1 - include/babeltrace/ctf-ir/event-types.h | 15 --------------- 3 files changed, 33 deletions(-) diff --git a/formats/ctf/ir/event-types.c b/formats/ctf/ir/event-types.c index 94723f2b..5c091bc7 100644 --- a/formats/ctf/ir/event-types.c +++ b/formats/ctf/ir/event-types.c @@ -358,9 +358,6 @@ void bt_ctf_field_type_destroy(struct bt_ctf_ref *ref) return; } - if (type->alias_name) { - g_string_free(type->alias_name, TRUE); - } type_destroy_funcs[type_id](ref); } @@ -1780,20 +1777,6 @@ enum ctf_type_id bt_ctf_field_type_get_type_id( return type->declaration->id; } -const char *bt_ctf_field_type_get_alias_name( - struct bt_ctf_field_type *type) -{ - const char *name = NULL; - - if (!type || !type->alias_name) { - goto end; - } - - name = type->alias_name->str; -end: - return name; -} - void bt_ctf_field_type_get(struct bt_ctf_field_type *type) { if (!type) { diff --git a/include/babeltrace/ctf-ir/event-types-internal.h b/include/babeltrace/ctf-ir/event-types-internal.h index 8c3ce2b8..2f4c98ed 100644 --- a/include/babeltrace/ctf-ir/event-types-internal.h +++ b/include/babeltrace/ctf-ir/event-types-internal.h @@ -44,7 +44,6 @@ typedef int(*type_serialize_func)(struct bt_ctf_field_type *, struct bt_ctf_field_type { struct bt_ctf_ref ref_count; struct bt_declaration *declaration; - GString *alias_name; type_freeze_func freeze; type_serialize_func serialize; /* diff --git a/include/babeltrace/ctf-ir/event-types.h b/include/babeltrace/ctf-ir/event-types.h index 95623181..19dd6a33 100644 --- a/include/babeltrace/ctf-ir/event-types.h +++ b/include/babeltrace/ctf-ir/event-types.h @@ -739,21 +739,6 @@ extern int bt_ctf_field_type_set_byte_order(struct bt_ctf_field_type *type, extern enum ctf_type_id bt_ctf_field_type_get_type_id( struct bt_ctf_field_type *type); -/* - * bt_ctf_field_type_get_alias_nameL get a field type's alias name - * - * A type's alias name is set if it was resolved from a typedef or - * typealias. Note that types that are resolved from a ypealias or - * typedef are distinct from the underlying type and can't be compared - * pointer-wise. - * - * @param type Field type. - * - * Returns a field type's alias name, NULL on error. - */ -extern const char *bt_ctf_field_type_get_alias_name( - struct bt_ctf_field_type *type); - /* * bt_ctf_field_type_get and bt_ctf_field_type_put: increment and decrement * the field type's reference count. -- 2.34.1