diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-21 21:40:13 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-21 21:40:13 +0000 |
commit | 55baff4c9bcbc001cbb8972c289ebfa356d4665b (patch) | |
tree | bd086f9ddf8c5f2db9642ee04fc382064ebd2029 /py/objexcept.c | |
parent | 91d457a27752fa125e9c6107bf51c918e021dc95 (diff) | |
download | micropython-55baff4c9bcbc001cbb8972c289ebfa356d4665b.tar.gz micropython-55baff4c9bcbc001cbb8972c289ebfa356d4665b.zip |
Revamp qstrs: they now include length and hash.
Can now have null bytes in strings. Can define ROM qstrs per port using
qstrdefsport.h
Diffstat (limited to 'py/objexcept.c')
-rw-r--r-- | py/objexcept.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objexcept.c b/py/objexcept.c index 2e145ee358..c91b71dd9e 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -7,7 +7,7 @@ #include "nlr.h" #include "misc.h" #include "mpconfig.h" -#include "mpqstr.h" +#include "qstr.h" #include "obj.h" #include "objtuple.h" @@ -100,7 +100,7 @@ mp_obj_t mp_obj_new_exception_msg_varg(qstr id, const char *fmt, ...) { va_start(ap, fmt); vstr_vprintf(vstr, fmt, ap); va_end(ap); - o->msg = qstr_from_str_take(vstr->buf, vstr->alloc); + o->msg = qstr_from_strn_take(vstr->buf, vstr->alloc, vstr->len); } return o; |