void IoCoroutine_free(IoCoroutine *self) { Coro *coro = DATA(self)->cid; if (coro) Coro_free(coro); Stack_free(DATA(self)->ioStack); io_free(DATA(self)); }
void IoCoroutine_free(IoCoroutine *self) { //printf("IoCoroutine_free %p\n", (void *)self); Coro *coro = DATA(self)->cid; if (coro) Coro_free(coro); Stack_free(DATA(self)->ioStack); io_free(DATA(self)); }
IoObject *IoCoroutine_freeStack(IoCoroutine *self, IoObject *locals, IoMessage *m) { IoCoroutine *current = IoState_currentCoroutine(IOSTATE); if (current != self && DATA(self)->cid) { Coro_free(DATA(self)->cid); DATA(self)->cid = NULL; } return self; }
IO_METHOD(IoCoroutine, freeStack) { /*doc Coroutine freeStack Frees all the internal data from the receiver's stack. Returns self. */ IoCoroutine *current = IoState_currentCoroutine(IOSTATE); if (current != self && DATA(self)->cid) { Coro_free(DATA(self)->cid); DATA(self)->cid = NULL; } return self; }