From 4852e09c7914a4d4f2938dddbe155a2075bb2eb3 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 27 Feb 2015 00:36:39 +0000 Subject: 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. --- py/objexcept.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'py/objexcept.h') 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; -- cgit v1.2.3