aboutsummaryrefslogtreecommitdiff
path: root/py/mperrno.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-05-12 14:27:52 +0100
committerDamien George <damien.p.george@gmail.com>2016-05-12 14:27:52 +0100
commit9a9249964155f333131bbd728ffc755e80dc68a2 (patch)
treecbcc538bdbdaf357a10931ba3d4a35d58b699c37 /py/mperrno.h
parenta314b842bb5e0c2c43d4194320f48fa875fc176d (diff)
py/objexcept: Don't convert errno to str in constructor, do it in print.
OSError's are now printed like: OSError: [Errno 1] EPERM but only if the string corresponding to the errno is found.
Diffstat (limited to 'py/mperrno.h')
-rw-r--r--py/mperrno.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/py/mperrno.h b/py/mperrno.h
index 2dbb7b0a8..f7784f6f7 100644
--- a/py/mperrno.h
+++ b/py/mperrno.h
@@ -135,9 +135,7 @@
#endif
#if MICROPY_PY_UERRNO
-mp_obj_t mp_errno_to_str(mp_obj_t errno_val);
-#else
-static inline mp_obj_t mp_errno_to_str(mp_obj_t errno_val) { return errno_val; }
+qstr mp_errno_to_str(mp_obj_t errno_val);
#endif
#endif // __MICROPY_INCLUDED_PY_MPERRNO_H__