summaryrefslogtreecommitdiff
path: root/py/objtuple.c
diff options
context:
space:
mode:
authorJohn R. Lenton <jlenton@gmail.com>2014-01-07 23:06:46 +0000
committerJohn R. Lenton <jlenton@gmail.com>2014-01-07 23:06:46 +0000
commit9c83ec0edac2394431a5d1aecba1d666ffdea0a3 (patch)
treeccf18860da373cf13194788b793a962335d69fef /py/objtuple.c
parent27d4ca7693c276d09a911c00c3442729c516dc23 (diff)
Merge remote-tracking branch 'upstream/master' into dict_feats
Diffstat (limited to 'py/objtuple.c')
-rw-r--r--py/objtuple.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/py/objtuple.c b/py/objtuple.c
index ceca4200e..0050fc5ea 100644
--- a/py/objtuple.c
+++ b/py/objtuple.c
@@ -103,14 +103,13 @@ const mp_obj_type_t tuple_type = {
.make_new = tuple_make_new,
.binary_op = tuple_binary_op,
.getiter = tuple_getiter,
- .methods = {{NULL, NULL},},
};
// the zero-length tuple
static const mp_obj_tuple_t empty_tuple_obj = {{&tuple_type}, 0};
const mp_obj_t mp_const_empty_tuple = (mp_obj_t)&empty_tuple_obj;
-mp_obj_t mp_obj_new_tuple(uint n, mp_obj_t *items) {
+mp_obj_t mp_obj_new_tuple(uint n, const mp_obj_t *items) {
if (n == 0) {
return mp_const_empty_tuple;
}
@@ -123,7 +122,7 @@ mp_obj_t mp_obj_new_tuple(uint n, mp_obj_t *items) {
return o;
}
-mp_obj_t mp_obj_new_tuple_reverse(uint n, mp_obj_t *items) {
+mp_obj_t mp_obj_new_tuple_reverse(uint n, const mp_obj_t *items) {
if (n == 0) {
return mp_const_empty_tuple;
}
@@ -166,7 +165,6 @@ static const mp_obj_type_t tuple_it_type = {
{ &mp_const_type },
"tuple_iterator",
.iternext = tuple_it_iternext,
- .methods = {{NULL, NULL},},
};
static mp_obj_t mp_obj_new_tuple_iterator(mp_obj_tuple_t *tuple, int cur) {