diff options
author | mux <freelancer.c@gmail.com> | 2014-06-14 15:53:11 +0200 |
---|---|---|
committer | mux <freelancer.c@gmail.com> | 2014-06-14 15:53:11 +0200 |
commit | 00db5c81e1de9f3f566554410ef0a0881c012adb (patch) | |
tree | 32237e6dfbe1d59252179b39aeac5139cf10bfcd | |
parent | 34e7b67d3c5882ac2078a87bbeb2ab5d09e6717a (diff) | |
download | micropython-00db5c81e1de9f3f566554410ef0a0881c012adb.tar.gz micropython-00db5c81e1de9f3f566554410ef0a0881c012adb.zip |
Add __assert_func only if DEBUG=1
-rw-r--r-- | stmhal/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stmhal/main.c b/stmhal/main.c index 3434f3ea58..ec6d6bcd23 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -115,11 +115,13 @@ void nlr_jump_fail(void *val) { __fatal_error(""); } +#ifndef NDEBUG void __assert_func(const char *file, int line, const char *func, const char *expr) { (void)func; printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line); __fatal_error(""); } +#endif STATIC mp_obj_t pyb_config_source_dir = MP_OBJ_NULL; STATIC mp_obj_t pyb_config_main = MP_OBJ_NULL; |