Move mp_get_stream non-inline
This caused a build error with external native code, as MP_QSTR_protocol_stream was not available.
This commit is contained in:
parent
c174bc42fa
commit
14e0bdbae3
@ -576,4 +576,7 @@ int mp_stream_posix_fsync(mp_obj_t stream) {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mp_stream_p_t *mp_get_stream(mp_const_obj_t self) {
|
||||||
|
return mp_proto_get(MP_QSTR_protocol_stream, self);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -99,9 +99,7 @@ MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_stream_ioctl_obj);
|
|||||||
#define MP_STREAM_OP_IOCTL (4)
|
#define MP_STREAM_OP_IOCTL (4)
|
||||||
|
|
||||||
// Object is assumed to have a non-NULL stream protocol with valid r/w/ioctl methods
|
// Object is assumed to have a non-NULL stream protocol with valid r/w/ioctl methods
|
||||||
static inline const mp_stream_p_t *mp_get_stream(mp_const_obj_t self) {
|
const mp_stream_p_t *mp_get_stream(mp_const_obj_t self);
|
||||||
return mp_proto_get(MP_QSTR_protocol_stream, self);
|
|
||||||
}
|
|
||||||
|
|
||||||
const mp_stream_p_t *mp_get_stream_raise(mp_obj_t self_in, int flags);
|
const mp_stream_p_t *mp_get_stream_raise(mp_obj_t self_in, int flags);
|
||||||
mp_obj_t mp_stream_close(mp_obj_t stream);
|
mp_obj_t mp_stream_close(mp_obj_t stream);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user