summaryrefslogtreecommitdiffhomepage
path: root/ast.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-09-08 20:12:39 +0200
committerJo-Philipp Wich <jo@mein.io>2020-09-08 20:12:39 +0200
commitc735882bb492ff81f98773186652dbe878ff3d60 (patch)
tree4cbfadecef27402605a00298222c223f8ccccb51 /ast.h
parent42e8fcddf0ec78d81d6733c8a14592df9dcb2381 (diff)
parser, eval: use an ut_op flag to denote postfix access
The current code still abused the JSON value pointer to denote postfix access for certain operations which led to a crash when freeing the parser state due to an attempt to put a (void *)1 pointer. Since we do have the ability to set flags on operations since the AST rework, use this much cleaner approach and avoid the invalid pointer hackery. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ast.h b/ast.h
index b45ee41..9bb6696 100644
--- a/ast.h
+++ b/ast.h
@@ -55,6 +55,7 @@ struct ut_op {
uint16_t is_first:1;
uint16_t is_op:1;
uint16_t is_overflow:1;
+ uint16_t is_postfix:1;
uint32_t off;
struct json_object *val;
union {