From 7a16fadbf843ca5d49fb20b5f5785ffccfd9019f Mon Sep 17 00:00:00 2001 From: ian-v Date: Mon, 6 Jan 2014 09:52:29 -0800 Subject: Co-exist with C++ (issue #85) --- py/objclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'py/objclass.c') diff --git a/py/objclass.c b/py/objclass.c index 536abdf7e..c2638bc87 100644 --- a/py/objclass.c +++ b/py/objclass.c @@ -26,7 +26,7 @@ mp_obj_t class_call_n(mp_obj_t self_in, int n_args, const mp_obj_t *args) { mp_obj_t o = mp_obj_new_instance(self_in); // look for __init__ function - mp_map_elem_t *init_fn = mp_qstr_map_lookup(self->locals, MP_QSTR___init__, false); + mp_map_elem_t *init_fn = mp_qstr_map_lookup(self->locals, MP_QSTR___init__, MP_FALSE); if (init_fn != NULL) { // call __init__ function @@ -70,7 +70,7 @@ const mp_obj_type_t class_type = { NULL, // binary_op NULL, // getiter NULL, // iternext - .methods = {{NULL, NULL},}, + .methods = NULL, }; mp_obj_t mp_obj_new_class(mp_map_t *class_locals) { -- cgit v1.2.3 From 5fd8fd2c16076f683b629b513e8865e461d4c9a8 Mon Sep 17 00:00:00 2001 From: ian-v Date: Mon, 6 Jan 2014 13:51:53 -0800 Subject: Revert MP_BOOL, etc. and use instead --- py/objclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objclass.c') diff --git a/py/objclass.c b/py/objclass.c index c2638bc87..086645cbb 100644 --- a/py/objclass.c +++ b/py/objclass.c @@ -26,7 +26,7 @@ mp_obj_t class_call_n(mp_obj_t self_in, int n_args, const mp_obj_t *args) { mp_obj_t o = mp_obj_new_instance(self_in); // look for __init__ function - mp_map_elem_t *init_fn = mp_qstr_map_lookup(self->locals, MP_QSTR___init__, MP_FALSE); + mp_map_elem_t *init_fn = mp_qstr_map_lookup(self->locals, MP_QSTR___init__, false); if (init_fn != NULL) { // call __init__ function -- cgit v1.2.3