Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
5ba58f4a
Commit
5ba58f4a
authored
May 01, 2014
by
Paul Sokolovsky
Browse files
objgenerator: Fix check for too few args passed to gen function.
parent
c3103b55
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/objfun.c
View file @
5ba58f4a
...
...
@@ -194,8 +194,12 @@ bool mp_obj_fun_prepare_simple_args(mp_obj_t self_in, uint n_args, uint n_kw, co
if
(
n_args
>
self
->
n_pos_args
)
{
goto
arg_error
;
}
else
{
extra_args
-=
self
->
n_pos_args
-
n_args
;
n_extra_args
+=
self
->
n_pos_args
-
n_args
;
if
(
n_args
>=
self
->
n_pos_args
-
self
->
n_def_args
)
{
extra_args
-=
self
->
n_pos_args
-
n_args
;
n_extra_args
+=
self
->
n_pos_args
-
n_args
;
}
else
{
fun_pos_args_mismatch
(
self
,
self
->
n_pos_args
-
self
->
n_def_args
,
n_args
);
}
}
*
out_args1
=
args
;
*
out_args1_len
=
n_args
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment