10000 windows: Make keyboard_interrupt_obj available, it's standard feature. · micropython/micropython@5efd3f0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5efd3f0

Browse files
author
Paul Sokolovsky
committed
windows: Make keyboard_interrupt_obj available, it's standard feature.
1 parent 3c2b377 commit 5efd3f0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

unix/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,8 @@ int main(int argc, char **argv) {
401401

402402
mp_init();
403403

404-
#ifndef _WIN32
405404
// create keyboard interrupt object
406405
MP_STATE_VM(keyboard_interrupt_obj) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
407-
#endif
408406

409407
char *home = getenv("HOME");
410408
char *path = getenv("MICROPYPATH");

windows/mpconfigport.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ extern const struct _mp_obj_module_t mp_module_time;
156156

157157
#if MICROPY_USE_READLINE == 1
158158
#define MICROPY_PORT_ROOT_POINTERS \
159-
char *readline_hist[50];
159+
char *readline_hist[50]; \
160+
mp_obj_t keyboard_interrupt_obj;
160161
#endif
161162

162163
#define MP_STATE_PORT MP_STATE_VM

0 commit comments

Comments
 (0)
0