Beispiel #1
0
IoTag *IoNumber_newTag(void *state)
{
	IoTag *tag = IoTag_newWithName_("Number");
	IoTag_state_(tag, state);
	IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoNumber_rawClone);
	IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoNumber_free);
	IoTag_compareFunc_(tag, (IoTagCompareFunc *)IoNumber_compare);
	//IoTag_writeToStreamFunc_(tag, (IoTagWriteToStreamFunc *)IoNumber_writeToStream_);
	//IoTag_readFromStreamFunc_(tag, (IoTagReadFromStreamFunc *)IoNumber_readFromStream_);
	assert(sizeof(double) <= sizeof(void *)*2);
	/*printf("Number tag = %p\n", (void *)tag);*/
	return tag;
}
// _tag makes an IoTag for the bookkeeping of names and methods for this proto
IoTag *IoCInvokeStructureInstance_newTag(void *state)
{
        // first allocate a new IoTag
        IoTag *tag = IoTag_newWithName_("StructureInstance");

        // record this tag as belonging to this VM
        IoTag_state_(tag, state);

        // give the tag pointers to the _free, _mark and _rawClone functions we'll need to use
        IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCInvokeStructureInstance_free);
        IoTag_markFunc_(tag, (IoTagMarkFunc *)IoCInvokeStructureInstance_mark);
        IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCInvokeStructureInstance_rawClone);
        return tag;
}
Beispiel #3
0
// _tag makes an IoTag for the bookkeeping of names and methods for this proto
IoTag *IoSVN_newTag(void *state)
{
	printf("IoSVN_newTag\n");

	// first allocate a new IoTag
	IoTag *tag = IoTag_newWithName_("SVN");

	// record this tag as belonging to this VM
	IoTag_state_(tag, state);

	// give the tag pointers to the _free, _mark and _rawClone functions we'll need to use
	IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoSVN_free);
	IoTag_markFunc_(tag, (IoTagMarkFunc *)IoSVN_mark);
	IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoSVN_rawClone);
	return tag;
}