diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/datatype.h | 1 | ||||
-rw-r--r-- | include/expression.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/datatype.h b/include/datatype.h index 73f38f66..c040c397 100644 --- a/include/datatype.h +++ b/include/datatype.h @@ -176,6 +176,7 @@ extern const struct datatype *datatype_lookup(enum datatypes type); extern const struct datatype *datatype_lookup_byname(const char *name); extern struct datatype *datatype_get(const struct datatype *dtype); extern void datatype_set(struct expr *expr, const struct datatype *dtype); +extern void __datatype_set(struct expr *expr, const struct datatype *dtype); extern void datatype_free(const struct datatype *dtype); struct datatype *dtype_clone(const struct datatype *orig_dtype); diff --git a/include/expression.h b/include/expression.h index 3f06a38a..39b89a99 100644 --- a/include/expression.h +++ b/include/expression.h @@ -121,7 +121,11 @@ enum symbol_types { * @maxval: expected maximum value */ struct expr_ctx { + /* expr_ctx does not own the reference to dtype. The caller must ensure + * the valid lifetime. + */ const struct datatype *dtype; + enum byteorder byteorder; unsigned int len; unsigned int maxval; |