diff options
author | Damien George <damien.p.george@gmail.com> | 2019-12-16 15:40:05 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-12-27 22:51:17 +1100 |
commit | 09376f0e47b3ab4a5a2a3c2c768ff913e1835cc8 (patch) | |
tree | 4fd6399e318c977b3ddd20c13659f176b70f3f5b /extmod/modussl_mbedtls.c | |
parent | f5eec903fa961135296e2656821450979e413248 (diff) |
py: Introduce MP_ROM_NONE macro for ROM to refer to None object.
This helps to prevent mistakes, and allows easily changing the ROM value of
None if needed.
Diffstat (limited to 'extmod/modussl_mbedtls.c')
-rw-r--r-- | extmod/modussl_mbedtls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extmod/modussl_mbedtls.c b/extmod/modussl_mbedtls.c index a71adc5b3..5c41ea2d8 100644 --- a/extmod/modussl_mbedtls.c +++ b/extmod/modussl_mbedtls.c @@ -346,10 +346,10 @@ STATIC const mp_obj_type_t ussl_socket_type = { STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { // TODO: Implement more args static const mp_arg_t allowed_args[] = { - { MP_QSTR_key, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_PTR(&mp_const_none_obj)} }, - { MP_QSTR_cert, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_PTR(&mp_const_none_obj)} }, + { MP_QSTR_key, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_NONE} }, + { MP_QSTR_cert, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_NONE} }, { MP_QSTR_server_side, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} }, - { MP_QSTR_server_hostname, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_PTR(&mp_const_none_obj)} }, + { MP_QSTR_server_hostname, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_NONE} }, { MP_QSTR_do_handshake, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = true} }, }; |