diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-08-24 13:26:52 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-08-25 20:38:15 +0200 |
commit | 2d2ab2f4f0c56f613fb093180ed58f990f3c67e0 (patch) | |
tree | 2fb218d690d3ccc68873b449a14aedf091031f50 /lib.c | |
parent | 6564992f2464e561d11f82f65731bc0c44ea9e2a (diff) |
treewide: add dedicated T_CFUNC type
Tag C function values with a dedicated T_CFUNC type to clearly differentiate
them from runtime declared functions.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1609,8 +1609,8 @@ func_to_string(struct json_object *v, struct printbuf *pb, int level, int flags) static bool add_function(struct ut_state *state, struct json_object *scope, const char *name, ut_c_fn *fn) { - struct ut_opcode *op = ut_new_op(state, T_FUNC, - json_object_new_boolean(1), (struct ut_opcode *)fn, (void *)1); + struct ut_opcode *op = ut_new_op(state, T_CFUNC, + json_object_new_boolean(0), (struct ut_opcode *)fn, (void *)1); json_object_set_serializer(op->val, func_to_string, op, NULL); |