Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
fa5a5917
Commit
fa5a5917
authored
8 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py/objexcept: Convert mp_uint_t to size_t where appropriate.
parent
efa62902
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
py/obj.h
+1
-1
1 addition, 1 deletion
py/obj.h
py/objexcept.c
+1
-1
1 addition, 1 deletion
py/objexcept.c
py/objexcept.h
+2
-2
2 additions, 2 deletions
py/objexcept.h
with
4 additions
and
4 deletions
py/obj.h
+
1
−
1
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
);
...
...
This diff is collapsed.
Click to expand it.
py/objexcept.c
+
1
−
1
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
);
}
...
...
This diff is collapsed.
Click to expand it.
py/objexcept.h
+
2
−
2
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment