summaryrefslogtreecommitdiffstatshomepage
path: root/py/objfun.c
diff options
context:
space:
mode:
authorJohn R. Lenton <jlenton@gmail.com>2014-01-07 18:01:08 +0000
committerJohn R. Lenton <jlenton@gmail.com>2014-01-07 18:01:08 +0000
commit270112f7312f724e46ae34649dfce3ec43b697e0 (patch)
treed7438ae877350aede062d8ac7e62e52ab35cb018 /py/objfun.c
parentc06763a0207dde7f2060f7b1670a0b99298a01f8 (diff)
parentfd04bb3bacf5dbc4d79c04a49520e3e81abb7352 (diff)
downloadmicropython-270112f7312f724e46ae34649dfce3ec43b697e0.tar.gz
micropython-270112f7312f724e46ae34649dfce3ec43b697e0.zip
Merge remote-tracking branch 'upstream/master' into listsort. Lots of conflict fun.
Conflicts: py/obj.h py/objbool.c py/objboundmeth.c py/objcell.c py/objclass.c py/objclosure.c py/objcomplex.c py/objdict.c py/objexcept.c py/objfun.c py/objgenerator.c py/objinstance.c py/objmodule.c py/objrange.c py/objset.c py/objslice.c
Diffstat (limited to 'py/objfun.c')
-rw-r--r--py/objfun.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/py/objfun.c b/py/objfun.c
index 3697c64303..395824b046 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -92,13 +92,10 @@ mp_obj_t fun_native_call_n_kw(mp_obj_t self_in, int n_args, int n_kw, const mp_o
}
const mp_obj_type_t fun_native_type = {
- .base = { &mp_const_type },
- .name = "function",
+ { &mp_const_type },
+ "function",
.call_n = fun_native_call_n,
.call_n_kw = fun_native_call_n_kw,
- .methods = {
- {NULL, NULL}, // end-of-list sentinel
- },
};
mp_obj_t rt_make_function_0(mp_fun_0_t fun) {
@@ -189,12 +186,9 @@ mp_obj_t fun_bc_call_n(mp_obj_t self_in, int n_args, const mp_obj_t *args) {
}
const mp_obj_type_t fun_bc_type = {
- .base = { &mp_const_type },
- .name = "function",
+ { &mp_const_type },
+ "function",
.call_n = fun_bc_call_n,
- .methods = {
- {NULL, NULL}, // end-of-list sentinel
- },
};
mp_obj_t mp_obj_new_fun_bc(int n_args, uint n_state, const byte *code) {
@@ -297,12 +291,9 @@ mp_obj_t fun_asm_call_n(mp_obj_t self_in, int n_args, const mp_obj_t *args) {
}
static const mp_obj_type_t fun_asm_type = {
- .base = { &mp_const_type },
- .name = "function",
+ { &mp_const_type },
+ "function",
.call_n = fun_asm_call_n,
- .methods = {
- {NULL, NULL}, // end-of-list sentinel
- },
};
mp_obj_t mp_obj_new_fun_asm(uint n_args, void *fun) {