We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent6de3786 commite0d49b7Copy full SHA for e0d49b7
extmod/modwebsocket.c
@@ -73,11 +73,11 @@ STATIC mp_obj_t websocket_make_new(const mp_obj_type_t *type, size_t n_args, siz
73
if (n_args>1&&args[1]==mp_const_true) {
74
o->opts |=BLOCKING_WRITE;
75
}
76
-returno;
+returnMP_OBJ_FROM_PTR(o);
77
78
79
STATICmp_uint_twebsocket_read(mp_obj_tself_in,void*buf,mp_uint_tsize,int*errcode) {
80
-mp_obj_websocket_t*self=self_in;
+mp_obj_websocket_t*self=MP_OBJ_TO_PTR(self_in);
81
constmp_stream_p_t*stream_p=mp_get_stream_raise(self->sock,MP_STREAM_OP_READ);
82
while (1) {
83
if (self->to_recv!=0) {
@@ -219,7 +219,7 @@ STATIC mp_uint_t websocket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
219
220
221
STATICmp_uint_twebsocket_write(mp_obj_tself_in,constvoid*buf,mp_uint_tsize,int*errcode) {
222
223
assert(size<0x10000);
224
byteheader[4]= {0x80 | (self->opts&FRAME_OPCODE_MASK)};
225
inthdr_sz;