summaryrefslogtreecommitdiffhomepage
path: root/eval.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-09-10 15:45:17 +0200
committerJo-Philipp Wich <jo@mein.io>2020-09-10 15:48:09 +0200
commitd33d86fae9b72b352a335488e2e1401e3b0c66a1 (patch)
tree709972eb83c809860f0beab06cd666a5bd6e0c5e /eval.c
parent05b5b677afa6af3026da2c49222ac8358992392d (diff)
eval: fix function return value handling in expressions
Since ut_invoke() takes care of unwrapping magic null, we don't need any special treatment for T_RETURN tags when processing expressions. Also drop T_BREAK case while we're at it since it cannot happen in this context. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/eval.c b/eval.c
index 6f7638c..ab5448a 100644
--- a/eval.c
+++ b/eval.c
@@ -970,13 +970,6 @@ ut_execute_exp(struct ut_state *state, uint32_t off)
struct ut_op *tag = val ? json_object_get_userdata(val) : NULL;
switch (tag ? tag->type : 0) {
- case T_RETURN:
- ut_write_str(tag->val);
- break;
-
- case T_BREAK:
- return val;
-
case T_EXCEPTION:
printf("<exception: %s>", json_object_get_string(val));
break;