summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/obj.h2
-rw-r--r--py/objexcept.c2
-rw-r--r--py/objexcept.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/py/obj.h b/py/obj.h
index d28623e64c..1b926ce144 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -621,7 +621,7 @@ mp_obj_t mp_obj_new_complex(mp_float_t real, mp_float_t imag);
#endif
mp_obj_t mp_obj_new_exception(const mp_obj_type_t *exc_type);
mp_obj_t mp_obj_new_exception_arg1(const mp_obj_type_t *exc_type, mp_obj_t arg);
-mp_obj_t mp_obj_new_exception_args(const mp_obj_type_t *exc_type, mp_uint_t n_args, const mp_obj_t *args);
+mp_obj_t mp_obj_new_exception_args(const mp_obj_type_t *exc_type, size_t n_args, const mp_obj_t *args);
mp_obj_t mp_obj_new_exception_msg(const mp_obj_type_t *exc_type, const char *msg);
mp_obj_t mp_obj_new_exception_msg_varg(const mp_obj_type_t *exc_type, const char *fmt, ...); // counts args by number of % symbols in fmt, excluding %%; can only handle void* sizes (ie no float/double!)
mp_obj_t mp_obj_new_fun_bc(mp_obj_t def_args, mp_obj_t def_kw_args, const byte *code, const mp_uint_t *const_table);
diff --git a/py/objexcept.c b/py/objexcept.c
index 76d34f56e4..1f1009ff78 100644
--- a/py/objexcept.c
+++ b/py/objexcept.c
@@ -312,7 +312,7 @@ mp_obj_t mp_obj_new_exception_arg1(const mp_obj_type_t *exc_type, mp_obj_t arg)
return mp_obj_new_exception_args(exc_type, 1, &arg);
}
-mp_obj_t mp_obj_new_exception_args(const mp_obj_type_t *exc_type, mp_uint_t n_args, const mp_obj_t *args) {
+mp_obj_t mp_obj_new_exception_args(const mp_obj_type_t *exc_type, size_t n_args, const mp_obj_t *args) {
assert(exc_type->make_new == mp_obj_exception_make_new);
return exc_type->make_new(exc_type, n_args, 0, args);
}
diff --git a/py/objexcept.h b/py/objexcept.h
index 88bce2b370..3128fded79 100644
--- a/py/objexcept.h
+++ b/py/objexcept.h
@@ -31,8 +31,8 @@
typedef struct _mp_obj_exception_t {
mp_obj_base_t base;
- mp_uint_t traceback_alloc : (BITS_PER_WORD / 2);
- mp_uint_t traceback_len : (BITS_PER_WORD / 2);
+ size_t traceback_alloc : (8 * sizeof(size_t) / 2);
+ size_t traceback_len : (8 * sizeof(size_t) / 2);
size_t *traceback_data;
mp_obj_tuple_t *args;
} mp_obj_exception_t;