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
b4fe6e28
Commit
b4fe6e28
authored
10 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py: Fix function type: () -> (void).
parent
78d702c3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
py/mpz.h
+1
-1
1 addition, 1 deletion
py/mpz.h
py/objstr.c
+2
-2
2 additions, 2 deletions
py/objstr.c
py/stackctrl.c
+3
-3
3 additions, 3 deletions
py/stackctrl.c
py/stackctrl.h
+3
-3
3 additions, 3 deletions
py/stackctrl.h
with
9 additions
and
9 deletions
py/mpz.h
+
1
−
1
View file @
b4fe6e28
...
...
@@ -75,7 +75,7 @@ void mpz_init_from_int(mpz_t *z, mp_int_t val);
void
mpz_init_fixed_from_int
(
mpz_t
*
z
,
mpz_dig_t
*
dig
,
mp_uint_t
dig_alloc
,
mp_int_t
val
);
void
mpz_deinit
(
mpz_t
*
z
);
mpz_t
*
mpz_zero
();
mpz_t
*
mpz_zero
(
void
);
mpz_t
*
mpz_from_int
(
mp_int_t
i
);
mpz_t
*
mpz_from_ll
(
long
long
i
,
bool
is_signed
);
mpz_t
*
mpz_from_str
(
const
char
*
str
,
mp_uint_t
len
,
bool
neg
,
mp_uint_t
base
);
...
...
This diff is collapsed.
Click to expand it.
py/objstr.c
+
2
−
2
View file @
b4fe6e28
...
...
@@ -46,7 +46,7 @@ STATIC mp_obj_t str_modulo_format(mp_obj_t pattern, mp_uint_t n_args, const mp_o
mp_obj_t
mp_obj_new_str_iterator
(
mp_obj_t
str
);
STATIC
mp_obj_t
mp_obj_new_bytes_iterator
(
mp_obj_t
str
);
STATIC
NORETURN
void
bad_implicit_conversion
(
mp_obj_t
self_in
);
STATIC
NORETURN
void
arg_type_mixup
();
STATIC
NORETURN
void
arg_type_mixup
(
void
);
/******************************************************************************/
/* str */
...
...
@@ -1957,7 +1957,7 @@ STATIC void bad_implicit_conversion(mp_obj_t self_in) {
}
}
STATIC
void
arg_type_mixup
()
{
STATIC
void
arg_type_mixup
(
void
)
{
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_TypeError
,
"Can't mix str and bytes arguments"
));
}
...
...
This diff is collapsed.
Click to expand it.
py/stackctrl.c
+
3
−
3
View file @
b4fe6e28
...
...
@@ -35,12 +35,12 @@
// Stack top at the start of program
char
*
stack_top
;
void
mp_stack_ctrl_init
()
{
void
mp_stack_ctrl_init
(
void
)
{
volatile
int
stack_dummy
;
stack_top
=
(
char
*
)
&
stack_dummy
;
}
mp_uint_t
mp_stack_usage
()
{
mp_uint_t
mp_stack_usage
(
void
)
{
// Assumes descending stack
volatile
int
stack_dummy
;
return
stack_top
-
(
char
*
)
&
stack_dummy
;
...
...
@@ -54,7 +54,7 @@ void mp_stack_set_limit(mp_uint_t limit) {
stack_limit
=
limit
;
}
void
mp_stack_check
()
{
void
mp_stack_check
(
void
)
{
if
(
mp_stack_usage
()
>=
stack_limit
)
{
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_RuntimeError
,
"maximum recursion depth exceeded"
));
}
...
...
This diff is collapsed.
Click to expand it.
py/stackctrl.h
+
3
−
3
View file @
b4fe6e28
...
...
@@ -24,13 +24,13 @@
* THE SOFTWARE.
*/
void
mp_stack_ctrl_init
();
mp_uint_t
mp_stack_usage
();
void
mp_stack_ctrl_init
(
void
);
mp_uint_t
mp_stack_usage
(
void
);
#if MICROPY_STACK_CHECK
void
mp_stack_set_limit
(
mp_uint_t
limit
);
void
mp_stack_check
();
void
mp_stack_check
(
void
);
#define MP_STACK_CHECK() mp_stack_check()
#else
...
...
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