summaryrefslogtreecommitdiffstatshomepage
path: root/ports/unix/coverage.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/unix/coverage.c')
-rw-r--r--ports/unix/coverage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/unix/coverage.c b/ports/unix/coverage.c
index 6b00cdfef2..a855237200 100644
--- a/ports/unix/coverage.c
+++ b/ports/unix/coverage.c
@@ -2,6 +2,7 @@
#include <string.h>
#include "py/obj.h"
+#include "py/objfun.h"
#include "py/objstr.h"
#include "py/runtime.h"
#include "py/gc.h"
@@ -449,7 +450,10 @@ STATIC mp_obj_t extra_coverage(void) {
mp_printf(&mp_plat_print, "# VM\n");
// call mp_execute_bytecode with invalide bytecode (should raise NotImplementedError)
+ mp_module_context_t context;
mp_obj_fun_bc_t fun_bc;
+ fun_bc.context = &context;
+ fun_bc.child_table = NULL;
fun_bc.bytecode = (const byte *)"\x01"; // just needed for n_state
mp_code_state_t *code_state = m_new_obj_var(mp_code_state_t, mp_obj_t, 1);
code_state->fun_bc = &fun_bc;