diff options
| author | hierophect <hierophect@gmail.com> | 2020-11-24 18:28:10 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-24 18:28:10 -0500 |
| commit | 510f4642347c6d7f47ad788cb03ac0b33db90bc1 (patch) | |
| tree | 7eb0707e2c6b9aa44f0d98daadbf31723e99e9e8 /shared-bindings | |
| parent | e83c481f0fbf6d1ed052b7bba12163e80d64ad4a (diff) | |
| parent | 8364734ba3a0765ba235f1cf93fe719e1da7f8ff (diff) | |
Merge branch 'main' into esp32s2-udp
Diffstat (limited to 'shared-bindings')
| -rw-r--r-- | shared-bindings/ps2io/Ps2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shared-bindings/ps2io/Ps2.c b/shared-bindings/ps2io/Ps2.c index 0977e08ff..07fa5cebb 100644 --- a/shared-bindings/ps2io/Ps2.c +++ b/shared-bindings/ps2io/Ps2.c @@ -116,8 +116,9 @@ STATIC void check_for_deinit(ps2io_ps2_obj_t *self) { //| ... //| STATIC mp_obj_t ps2io_ps2_obj___exit__(size_t n_args, const mp_obj_t *args) { - (void)n_args; - common_hal_ps2io_ps2_deinit(args[0]); + mp_check_self(MP_OBJ_IS_TYPE(args[0], &ps2io_ps2_type)); + ps2io_ps2_obj_t *self = MP_OBJ_TO_PTR(args[0]); + common_hal_ps2io_ps2_deinit(self); return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(ps2io_ps2___exit___obj, 4, 4, ps2io_ps2_obj___exit__); |
