diff options
author | Damien George <damien.p.george@gmail.com> | 2018-07-08 23:15:44 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-07-08 23:15:44 +1000 |
commit | aa735dc6a478f1f99f6e433b89ca047cbf536f33 (patch) | |
tree | 1697d1699273200e1b7da4198951ad5fbf684622 /extmod/machine_i2c.c | |
parent | b2b06450e314f776d66dc8985cf61a0d76f7a2ae (diff) |
extmod: Fix to support compiling with object representation D.
Diffstat (limited to 'extmod/machine_i2c.c')
-rw-r--r-- | extmod/machine_i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extmod/machine_i2c.c b/extmod/machine_i2c.c index 5d441b1ba..c1a93ab04 100644 --- a/extmod/machine_i2c.c +++ b/extmod/machine_i2c.c @@ -307,11 +307,11 @@ STATIC mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, s mp_map_t kw_args; mp_map_init_fixed_table(&kw_args, n_kw, args + n_args); machine_i2c_obj_init_helper(self, n_args, args, &kw_args); - return (mp_obj_t)self; + return MP_OBJ_FROM_PTR(self); } STATIC mp_obj_t machine_i2c_obj_init(size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { - machine_i2c_obj_init_helper(args[0], n_args - 1, args + 1, kw_args); + machine_i2c_obj_init_helper(MP_OBJ_TO_PTR(args[0]), n_args - 1, args + 1, kw_args); return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_KW(machine_i2c_init_obj, 1, machine_i2c_obj_init); |