MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / xs_serial_close

Function xs_serial_close

modules/io/serial/win/serial.c:236–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void xs_serial_close(xsMachine *the)
237{
238 xsSerial s = xsGetHostData(xsThis);
239 if (!s) return;
240
241 xsForget(s->obj);
242 if (s->hasOnError)
243 xsForget(s->onError);
244 if (s->hasOnReadable)
245 xsForget(s->onReadable);
246 if (s->hasOnWritable)
247 xsForget(s->onWritable);
248 xs_serial_destructor(s);
249
250 xsSetHostData(xsThis, NULL);
251}
252
253void xs_serial_read(xsMachine *the)
254{

Callers

nothing calls this directly

Calls 1

xs_serial_destructorFunction · 0.70

Tested by

no test coverage detected