| 173 | } |
| 174 | |
| 175 | void 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 | |
| 193 | void xs_serial_read(xsMachine *the) |
| 194 | { |
nothing calls this directly
no test coverage detected