Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
fa5a5917
Commit
fa5a5917
authored
Feb 16, 2017
by
Damien George
Browse files
py/objexcept: Convert mp_uint_t to size_t where appropriate.
parent
efa62902
Changes
3
Hide whitespace changes
Inline
Side-by-side
py/obj.h
View file @
fa5a5917
...
...
@@ -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
);
...
...
py/objexcept.c
View file @
fa5a5917
...
...
@@ -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
);
}
...
...
py/objexcept.h
View file @
fa5a5917
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment