mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
py: Add typecode to buffer protocol.
When querying an object that supports the buffer protocol, that object must now return a typecode (as per binary.[ch]). This does not have to be honoured by the caller, but can be useful for determining element size.
This commit is contained in:
@@ -272,7 +272,7 @@ STATIC mp_obj_t int_from_bytes(uint n_args, const mp_obj_t *args) {
|
||||
// TODO: Support signed param (assumes signed=False at the moment)
|
||||
|
||||
// get the buffer info
|
||||
buffer_info_t bufinfo;
|
||||
mp_buffer_info_t bufinfo;
|
||||
mp_get_buffer_raise(args[1], &bufinfo);
|
||||
|
||||
// convert the bytes to an integer
|
||||
|
||||
Reference in New Issue
Block a user