| 234 | } |
| 235 | |
| 236 | void 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 | |
| 253 | void xs_serial_read(xsMachine *the) |
| 254 | { |
nothing calls this directly
no test coverage detected