예제 #1
0
IO_METHOD(IoSeq, empty)
{
	/*doc Sequence empty
	Sets all bytes in the receiver to 0x0 and sets
	its length to 0. Returns self.
	*/

	IO_ASSERT_NOT_SYMBOL(self);
	UArray_clear(DATA(self));
	UArray_setSize_(DATA(self), 0);
	return self;
}
예제 #2
0
파일: IoSeq_mutable.c 프로젝트: eklitzke/io
IoObject *IoSeq_empty(IoSeq *self, IoObject *locals, IoMessage *m)
{
	/*doc Sequence empty
	Sets all bytes in the receiver to 0x0 and sets
	it's length to 0. Returns self.
	*/

	IO_ASSERT_NOT_SYMBOL(self);
	UArray_clear(DATA(self));
	UArray_setSize_(DATA(self), 0);
	return self;
}