From 5efd3f0dcac6e2f3f33c3edce7d3f2974bbf8e78 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 18 Dec 2015 00:47:03 +0200 Subject: [PATCH] windows: Make keyboard_interrupt_obj available, it's standard feature. --- unix/main.c | 2 -- windows/mpconfigport.h | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) 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