summaryrefslogtreecommitdiffstatshomepage
path: root/tests/pyb/timer_callback.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-09-19 11:17:02 +1000
committerDamien George <damien.p.george@gmail.com>2016-09-19 12:28:55 +1000
commit5da0d29d3cefa6a3cac52e0db96e9ede820d6a51 (patch)
treecf39b02347b40016088c907cd2e1b3aaada8b653 /tests/pyb/timer_callback.py
parentadaf0d865cd6c81fb352751566460506392ed55f (diff)
downloadmicropython-5da0d29d3cefa6a3cac52e0db96e9ede820d6a51.tar.gz
micropython-5da0d29d3cefa6a3cac52e0db96e9ede820d6a51.zip
py/vstr: Remove vstr.had_error flag and inline basic vstr functions.
The vstr.had_error flag was a relic from the very early days which assumed that the malloc functions (eg m_new, m_renew) returned NULL if they failed to allocate. But that's no longer the case: these functions will raise an exception if they fail. Since it was impossible for had_error to be set, this patch introduces no change in behaviour. An alternative option would be to change the malloc calls to the _maybe variants, which return NULL instead of raising, but then a lot of code will need to explicitly check if the vstr had an error and raise if it did. The code-size savings for this patch are, in bytes: bare-arm:188, minimal:456, unix(NDEBUG,x86-64):368, stmhal:228, esp8266:360.
Diffstat (limited to 'tests/pyb/timer_callback.py')
0 files changed, 0 insertions, 0 deletions