diff options
author | Thomas Haller <thaller@redhat.com> | 2023-09-08 19:34:47 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-09-08 20:11:44 +0200 |
commit | bd063341a552c5e79cffa26e8b7a06fcdbfcd96c (patch) | |
tree | 3c009a2c751db2cc1b17f8f41b922306a75d238a /src/datatype.c | |
parent | 5722eda4eec170fe26bf274cb550c875f5b94a0c (diff) |
datatype: rename "dtype_clone()" to datatype_clone()
The struct is called "datatype" and related functions have the fitting
"datatype_" prefix. Rename.
Also rename the internal "dtype_alloc()" to "datatype_alloc()".
This is a follow up to commit 01a13882bb59 ('src: add reference counter
for dynamic datatypes'), which started adding "datatype_*()" functions.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/datatype.c')
-rw-r--r-- | src/datatype.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/datatype.c b/src/datatype.c index ba1192c8..1531a5d2 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -1199,7 +1199,7 @@ static struct error_record *concat_type_parse(struct parse_ctx *ctx, sym->dtype->desc); } -static struct datatype *dtype_alloc(void) +static struct datatype *datatype_alloc(void) { struct datatype *dtype; @@ -1230,7 +1230,7 @@ void datatype_set(struct expr *expr, const struct datatype *dtype) expr->dtype = datatype_get(dtype); } -struct datatype *dtype_clone(const struct datatype *orig_dtype) +struct datatype *datatype_clone(const struct datatype *orig_dtype) { struct datatype *dtype; @@ -1286,7 +1286,7 @@ const struct datatype *concat_type_alloc(uint32_t type) } strncat(desc, ")", sizeof(desc) - strlen(desc) - 1); - dtype = dtype_alloc(); + dtype = datatype_alloc(); dtype->type = type; dtype->size = size; dtype->subtypes = subtypes; @@ -1306,7 +1306,7 @@ const struct datatype *set_datatype_alloc(const struct datatype *orig_dtype, if (orig_dtype != &integer_type) return orig_dtype; - dtype = dtype_clone(orig_dtype); + dtype = datatype_clone(orig_dtype); dtype->byteorder = byteorder; return dtype; |