aboutsummaryrefslogtreecommitdiff
path: root/stmhal/main.c
diff options
context:
space:
mode:
authorDamien George2014-09-15 15:53:09 +0100
committerDamien George2014-09-15 15:53:09 +0100
commitb92cbe612913a7c9d066c34912a3f77fe6392b2b (patch)
treeea267ba0d0d13a2dd7c4ef9ccb4b039bd993d328 /stmhal/main.c
parent83695596ed4fe3ad990b68cc5ff52c26caf2174d (diff)
py: Move definition of mp_sys_exit to core.
sys.exit always raises SystemExit so doesn't need a special implementation for each port. If C exit() is really needed, use the standard os._exit function. Also initialise mp_sys_path and mp_sys_argv in teensy port.
Diffstat (limited to 'stmhal/main.c')
-rw-r--r--stmhal/main.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/stmhal/main.c b/stmhal/main.c
index a34ffab32..6aa7b082d 100644
--- a/stmhal/main.c
+++ b/stmhal/main.c
@@ -550,16 +550,3 @@ soft_reset:
first_soft_reset = false;
goto soft_reset;
}
-
-/// \moduleref sys
-/// \function exit([retval])
-/// Raise a `SystemExit` exception. If an argument is given, it is the
-/// value given to `SystemExit`.
-STATIC NORETURN mp_obj_t mp_sys_exit(uint n_args, const mp_obj_t *args) {
- int rc = 0;
- if (n_args > 0) {
- rc = mp_obj_get_int(args[0]);
- }
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_SystemExit, mp_obj_new_int(rc)));
-}
-MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_sys_exit_obj, 0, 1, mp_sys_exit);