diff options
| author | Damien George | 2015-05-12 23:05:53 +0100 |
|---|---|---|
| committer | Damien George | 2015-05-12 23:05:53 +0100 |
| commit | c50772d19fe2804a6d0258f89dd9967d3b516fd3 (patch) | |
| tree | 9db781cc50f27fd4d07f9ef1db9a862a29690d53 /stmhal/modusocket.c | |
| parent | c2a4e4effc81d8ab21bb014e34355643e5ca0da2 (diff) | |
py: Add mp_obj_get_int_truncated and use it where appropriate.
mp_obj_get_int_truncated will raise a TypeError if the argument is not
an integral type. Use mp_obj_int_get_truncated only when you know the
argument is a small or big int.
Diffstat (limited to 'stmhal/modusocket.c')
| -rw-r--r-- | stmhal/modusocket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/modusocket.c b/stmhal/modusocket.c index 4ef614e4c..402378a38 100644 --- a/stmhal/modusocket.c +++ b/stmhal/modusocket.c @@ -287,7 +287,7 @@ STATIC mp_obj_t socket_setsockopt(mp_uint_t n_args, const mp_obj_t *args) { mp_uint_t optlen; mp_int_t val; if (mp_obj_is_integer(args[3])) { - val = mp_obj_int_get_truncated(args[3]); + val = mp_obj_get_int_truncated(args[3]); optval = &val; optlen = sizeof(val); } else { |
