summaryrefslogtreecommitdiffstatshomepage
path: root/py/objexcept.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-02-27 00:36:39 +0000
committerDamien George <damien.p.george@gmail.com>2015-02-27 00:36:39 +0000
commit4852e09c7914a4d4f2938dddbe155a2075bb2eb3 (patch)
treec1a6677c13cd5394a0c574eea31d1f33259edcd3 /py/objexcept.h
parentd155fecf9e27617d23a2249dacdbbcc203bdd85e (diff)
downloadmicropython-4852e09c7914a4d4f2938dddbe155a2075bb2eb3.tar.gz
micropython-4852e09c7914a4d4f2938dddbe155a2075bb2eb3.zip
py: Fix adding of traceback so that it appends to existing info.
This makes exception traceback info self contained (ie doesn't rely on list object, which was a bit of a hack), reduces code size, and reduces RAM footprint of exception by eliminating the list object. Addresses part of issue #1126.
Diffstat (limited to 'py/objexcept.h')
-rw-r--r--py/objexcept.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/objexcept.h b/py/objexcept.h
index d6cfacd944..783f69466f 100644
--- a/py/objexcept.h
+++ b/py/objexcept.h
@@ -31,7 +31,9 @@
typedef struct _mp_obj_exception_t {
mp_obj_base_t base;
- mp_obj_t traceback; // a list object, holding (file,line,block) as numbers (not Python objects); a hack for now
+ mp_uint_t traceback_alloc : (BITS_PER_WORD / 2);
+ mp_uint_t traceback_len : (BITS_PER_WORD / 2);
+ mp_uint_t *traceback_data;
mp_obj_tuple_t *args;
} mp_obj_exception_t;