Revamp qstrs: they now include length and hash.

Can now have null bytes in strings.  Can define ROM qstrs per port using
qstrdefsport.h
This commit is contained in:
Damien George
2014-01-21 21:40:13 +00:00
parent 91d457a277
commit 55baff4c9b
82 changed files with 581 additions and 313 deletions

View File

@@ -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;