diff options
Diffstat (limited to 'lib/utils/pyexec.h')
| -rw-r--r-- | lib/utils/pyexec.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/utils/pyexec.h b/lib/utils/pyexec.h index 0c7567e27..276e9a45a 100644 --- a/lib/utils/pyexec.h +++ b/lib/utils/pyexec.h @@ -31,6 +31,12 @@ typedef enum { PYEXEC_MODE_FRIENDLY_REPL, } pyexec_mode_kind_t; +typedef struct { + int return_code; + const mp_obj_type_t * exception_type; + int exception_line; +} pyexec_result_t; + extern pyexec_mode_kind_t pyexec_mode_kind; // Set this to the value (eg PYEXEC_FORCED_EXIT) that will be propagated through @@ -40,10 +46,11 @@ extern int pyexec_system_exit; #define PYEXEC_FORCED_EXIT (0x100) #define PYEXEC_SWITCH_MODE (0x200) +#define PYEXEC_EXCEPTION (0x400) int pyexec_raw_repl(void); int pyexec_friendly_repl(void); -int pyexec_file(const char *filename); +int pyexec_file(const char *filename, pyexec_result_t *result); int pyexec_frozen_module(const char *name); void pyexec_event_repl_init(void); int pyexec_event_repl_process_char(int c); |
