mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
stream: Convert .ioctl() to take fixed number of args.
This is more efficient, as allows to use register calling convention. If needed, a structure pointer can be passed as argument to pass more data.
This commit is contained in:
2
py/obj.h
2
py/obj.h
@@ -238,7 +238,7 @@ typedef struct _mp_stream_p_t {
|
||||
// are implementation-dependent, but will be exposed to user, e.g. via exception).
|
||||
mp_uint_t (*read)(mp_obj_t obj, void *buf, mp_uint_t size, int *errcode);
|
||||
mp_uint_t (*write)(mp_obj_t obj, const void *buf, mp_uint_t size, int *errcode);
|
||||
mp_uint_t (*ioctl)(mp_obj_t obj, mp_uint_t request, int *errcode, ...);
|
||||
mp_uint_t (*ioctl)(mp_obj_t obj, mp_uint_t request, mp_uint_t arg, int *errcode);
|
||||
mp_uint_t is_text : 1; // default is bytes, set this for text stream
|
||||
} mp_stream_p_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user