aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-impl.h
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2020-06-04 17:21:10 +0100
committerNick Alcock <nick.alcock@oracle.com>2020-07-22 18:02:18 +0100
commit3166467b00a08050366120fc3cd64336a51fa12c (patch)
tree1ff98117b986c2a6ef0960e9fb75da4d737cfa79 /libctf/ctf-impl.h
parent43a61d7d3e619385b98c03d43733572b5b1dc015 (diff)
downloadgdb-3166467b00a08050366120fc3cd64336a51fa12c.zip
gdb-3166467b00a08050366120fc3cd64336a51fa12c.tar.gz
gdb-3166467b00a08050366120fc3cd64336a51fa12c.tar.bz2
libctf: rename the type_mapping_key to type_key
The name was just annoyingly long and I kept misspelling it. It's also a bad name: it's not a mapping the type might be *used* in a type mapping, but it is itself a representation of a type (a ctf_file_t / ctf_id_t pair), not of a mapping at all. libctf/ * ctf-impl.h (ctf_link_type_mapping_key): Rename to... (ctf_link_type_key): ... this, adjusting member prefixes to match. (ctf_hash_type_mapping_key): Rename to... (ctf_hash_type_key): ... this. (ctf_hash_eq_type_mapping_key): Rename to... (ctf_hash_eq_type_key): ... this. * ctf-hash.c (ctf_hash_type_mapping_key): Rename to... (ctf_hash_type_key): ... this, and adjust for member name changes. (ctf_hash_eq_type_mapping_key): Rename to... (ctf_hash_eq_type_key): ... this, and adjust for member name changes. * ctf-link.c (ctf_add_type_mapping): Adjust. Note the lack of need for out-of-memory checking in this code. (ctf_type_mapping): Adjust.
Diffstat (limited to 'libctf/ctf-impl.h')
-rw-r--r--libctf/ctf-impl.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h
index 913a264..b9d52af 100644
--- a/libctf/ctf-impl.h
+++ b/libctf/ctf-impl.h
@@ -232,16 +232,15 @@ typedef struct ctf_str_atom_ref
uint32_t *caf_ref; /* A single ref to this string. */
} ctf_str_atom_ref_t;
-/* The structure used as the key in a ctf_link_type_mapping, which lets the
- linker machinery determine which type IDs on the input side of a link map to
- which types on the output side. (The value is a ctf_id_t: another
- index, not a type.) */
+/* The structure used as the key in a ctf_link_type_mapping. The value is a
+ type index, not a type ID. */
-typedef struct ctf_link_type_mapping_key
+typedef struct ctf_link_type_key
{
- ctf_file_t *cltm_fp;
- ctf_id_t cltm_idx;
-} ctf_link_type_mapping_key_t;
+ ctf_file_t *cltk_fp;
+ ctf_id_t cltk_idx;
+} ctf_link_type_key_t;
+
/* The ctf_file is the structure used to represent a CTF container to library
clients, who see it only as an opaque pointer. Modifications can therefore
@@ -421,12 +420,12 @@ extern ctf_file_t *ctf_get_dict (ctf_file_t *fp, ctf_id_t type);
typedef unsigned int (*ctf_hash_fun) (const void *ptr);
extern unsigned int ctf_hash_integer (const void *ptr);
extern unsigned int ctf_hash_string (const void *ptr);
-extern unsigned int ctf_hash_type_mapping_key (const void *ptr);
+extern unsigned int ctf_hash_type_key (const void *ptr);
typedef int (*ctf_hash_eq_fun) (const void *, const void *);
extern int ctf_hash_eq_integer (const void *, const void *);
extern int ctf_hash_eq_string (const void *, const void *);
-extern int ctf_hash_eq_type_mapping_key (const void *, const void *);
+extern int ctf_hash_eq_type_key (const void *, const void *);
extern int ctf_dynset_eq_string (const void *, const void *);