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
dfc0bac0
Commit
dfc0bac0
authored
Jan 07, 2014
by
Damien George
Browse files
py: Small big fix to type declarations.
parent
77757571
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/obj.h
View file @
dfc0bac0
...
...
@@ -49,7 +49,7 @@ typedef struct _mp_obj_base_t mp_obj_base_t;
#define MP_DEFINE_CONST_FUN_OBJ_3(obj_name, fun_name) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, false, 3, 3, (mp_fun_3_t)fun_name)
#define MP_DEFINE_CONST_FUN_OBJ_VAR(obj_name, n_args_min, fun_name) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, false, n_args_min, (~((machine_uint_t)0)), (mp_fun_var_t)fun_name)
#define MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(obj_name, n_args_min, n_args_max, fun_name) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, false, n_args_min, n_args_max, (mp_fun_var_t)fun_name)
#define MP_DEFINE_CONST_FUN_OBJ_KW(obj_name, fun_name) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, true, 0, (~((machine_uint_t)0)), (mp_fun_
var
_t)fun_name)
#define MP_DEFINE_CONST_FUN_OBJ_KW(obj_name, fun_name) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, true, 0, (~((machine_uint_t)0)), (mp_fun_
kw
_t)fun_name)
// Need to declare this here so we are not dependent on map.h
struct
_mp_map_t
;
...
...
@@ -62,7 +62,7 @@ typedef mp_obj_t (*mp_fun_2_t)(mp_obj_t, mp_obj_t);
typedef
mp_obj_t
(
*
mp_fun_3_t
)(
mp_obj_t
,
mp_obj_t
,
mp_obj_t
);
typedef
mp_obj_t
(
*
mp_fun_t
)(
void
);
typedef
mp_obj_t
(
*
mp_fun_var_t
)(
int
n
,
const
mp_obj_t
*
);
typedef
mp_obj_t
(
*
mp_fun_kw_t
)(
mp_obj_t
*
,
struct
_mp_map_t
*
);
typedef
mp_obj_t
(
*
mp_fun_kw_t
)(
mp_obj_t
,
struct
_mp_map_t
*
);
typedef
void
(
*
mp_print_fun_t
)(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
o
);
typedef
mp_obj_t
(
*
mp_make_new_fun_t
)(
mp_obj_t
type_in
,
int
n_args
,
const
mp_obj_t
*
args
);
// args are in reverse order in the array
...
...
py/objlist.c
View file @
dfc0bac0
...
...
@@ -143,9 +143,9 @@ static void mp_quicksort(mp_obj_t *head, mp_obj_t *tail, mp_obj_t key_fn, bool r
}
}
static
mp_obj_t
list_sort
(
mp_obj_t
*
args
,
mp_map_t
*
kwargs
)
{
static
mp_obj_t
list_sort
(
mp_obj_t
args
,
mp_map_t
*
kwargs
)
{
mp_obj_t
*
args_items
=
NULL
;
machine_
uint
_t
args_len
=
0
;
uint
args_len
=
0
;
qstr
key_idx
=
qstr_from_str_static
(
"key"
);
qstr
reverse_idx
=
qstr_from_str_static
(
"reverse"
);
...
...
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