diff --git a/unix/main.c b/unix/main.c index eb1ff7e89d..da618d566b 100644 --- a/unix/main.c +++ b/unix/main.c @@ -401,10 +401,8 @@ int main(int argc, char **argv) { mp_init(); - #ifndef _WIN32 // create keyboard interrupt object MP_STATE_VM(keyboard_interrupt_obj) = mp_obj_new_exception(&mp_type_KeyboardInterrupt); - #endif char *home = getenv("HOME"); char *path = getenv("MICROPYPATH"); diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h index 5f0b34f57b..3fbe82c993 100644 --- a/windows/mpconfigport.h +++ b/windows/mpconfigport.h @@ -156,7 +156,8 @@ extern const struct _mp_obj_module_t mp_module_time; #if MICROPY_USE_READLINE == 1 #define MICROPY_PORT_ROOT_POINTERS \ - char *readline_hist[50]; + char *readline_hist[50]; \ + mp_obj_t keyboard_interrupt_obj; #endif #define MP_STATE_PORT MP_STATE_VM