... | ... |
@@ -226,6 +226,12 @@ static int cli_bytecode_context_reset(struct cli_bc_ctx *ctx) |
226 | 226 |
ctx->maps = NULL; |
227 | 227 |
ctx->nmaps = 0; |
228 | 228 |
|
229 |
+#if HAVE_JSON |
|
230 |
+ free(ctx->jsonobjs); |
|
231 |
+ ctx->jsonobjs = NULL; |
|
232 |
+ ctx->njsonobjs = 0; |
|
233 |
+#endif |
|
234 |
+ |
|
229 | 235 |
ctx->containertype = CL_TYPE_ANY; |
230 | 236 |
return CL_SUCCESS; |
231 | 237 |
} |
... | ... |
@@ -32,6 +32,9 @@ |
32 | 32 |
#include "mpool.h" |
33 | 33 |
#include "hashtab.h" |
34 | 34 |
#include "events.h" |
35 |
+#if HAVE_JSON |
|
36 |
+#include "json/json.h" |
|
37 |
+#endif |
|
35 | 38 |
|
36 | 39 |
typedef uint32_t operand_t; |
37 | 40 |
typedef uint16_t bbid_t; |
... | ... |
@@ -227,6 +230,10 @@ struct cli_bc_ctx { |
227 | 227 |
cli_events_t *bc_events; |
228 | 228 |
int on_jit; |
229 | 229 |
int no_diff; |
230 |
+#if HAVE_JSON |
|
231 |
+ json_object **jsonobjs; |
|
232 |
+ unsigned njsonobjs; |
|
233 |
+#endif |
|
230 | 234 |
}; |
231 | 235 |
struct cli_all_bc; |
232 | 236 |
int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const struct cli_bc_func *func, const struct cli_bc_inst *inst); |