summaryrefslogtreecommitdiffstats
path: root/include/expression.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/expression.h')
-rw-r--r--include/expression.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/expression.h b/include/expression.h
index 6a509b33..13ca315c 100644
--- a/include/expression.h
+++ b/include/expression.h
@@ -104,21 +104,24 @@ enum symbol_types {
* @dtype: expected datatype
* @byteorder: expected byteorder
* @len: expected len
+ * @maxval: expected maximum value
*/
struct expr_ctx {
const struct datatype *dtype;
enum byteorder byteorder;
unsigned int len;
+ unsigned int maxval;
};
static inline void __expr_set_context(struct expr_ctx *ctx,
const struct datatype *dtype,
enum byteorder byteorder,
- unsigned int len)
+ unsigned int len, unsigned int maxval)
{
ctx->dtype = dtype;
ctx->byteorder = byteorder;
ctx->len = len;
+ ctx->maxval = maxval;
}
static inline void expr_set_context(struct expr_ctx *ctx,
@@ -126,7 +129,8 @@ static inline void expr_set_context(struct expr_ctx *ctx,
unsigned int len)
{
__expr_set_context(ctx, dtype,
- dtype ? dtype->byteorder : BYTEORDER_INVALID, len);
+ dtype ? dtype->byteorder : BYTEORDER_INVALID,
+ len, 0);
}
/**