py: Change exception traceback data to use size_t instead of mp_uint_t.

The traceback array stores qstrs and line numbers.  qstrs are typed as
size_t, and line numbers should safely fit in size_t as well.
This commit is contained in:
Damien George
2016-01-02 22:04:12 +00:00
parent ae4865efa1
commit 3d2daa2d03
5 changed files with 17 additions and 17 deletions

View File

@@ -86,7 +86,7 @@ void mp_obj_print(mp_obj_t o_in, mp_print_kind_t kind) {
// helper function to print an exception with traceback
void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) {
if (mp_obj_is_exception_instance(exc)) {
mp_uint_t n, *values;
size_t n, *values;
mp_obj_exception_get_traceback(exc, &n, &values);
if (n > 0) {
assert(n % 3 == 0);