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

Function xs_serial_close

modules/io/serial/mac/serial.c:175–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void xs_serial_close(xsMachine *the)
176{
177 xsSerial s = xsmcGetHostData(xsThis);
178 if (!s) return;
179
180 xsForget(s->obj);
181
182 if (s->hasOnReadable)
183 xsForget(s->onReadable);
184 if (s->hasOnWritable)
185 xsForget(s->onWritable);
186 if (s->hasOnError)
187 xsForget(s->onError);
188
189 xs_serial_destructor(s);
190 xsmcSetHostData(xsThis, NULL);
191}
192
193void xs_serial_read(xsMachine *the)
194{

Callers

nothing calls this directly

Calls 1

xs_serial_destructorFunction · 0.70

Tested by

no test coverage detected