summaryrefslogtreecommitdiff
path: root/tests/micropython/ringio.py
diff options
context:
space:
mode:
authorMichael Sawyer <mjfsawyer@gmail.com>2024-09-06 19:28:35 -0400
committerDamien George <damien@micropython.org>2024-09-19 15:00:06 +1000
commitb05983ff6d684561c8db6257ff816ef2e8114db5 (patch)
treef9347fafdfb13ec713a932273e4141359d6b0dbc /tests/micropython/ringio.py
parent8b35f2c7fad87198c4ccab243cb3e8a61c7d0f3c (diff)
unix/modffi: Fix signed integer cast in return_ffi_value.
Casting an ffi_arg to a signed int may truncate the value. E.g., when the ffi_arg is 64-bit and the signed int is 32-bit. Also, casting an ffi_arg to a larger signed type will not sign extend the value. E.g., when the ffi_arg is 32-bit and the larger signed type is int64_t. If the value is signed, it should be cast to ffi_sarg, which is the same size as ffi_arg. Signed-off-by: Michael Sawyer <mjfsawyer@gmail.com>
Diffstat (limited to 'tests/micropython/ringio.py')
0 files changed, 0 insertions, 0 deletions