2 docCopyright("Steve Dekorte", 2002)
3 docLicense("BSD revised")
14 IoTag
*IoTag_new(void)
16 IoTag
*self
= (IoTag
*)io_calloc(1, sizeof(IoTag
));
17 #ifdef IOMESSAGE_INLINE_PERFORM
18 self
->performFunc
= NULL
;
20 self
->performFunc
= (IoTagPerformFunc
*)IoObject_perform
;
22 //self->recyclableInstances = Stack_new();
23 //self->maxRecyclableInstances = 10000;
27 IoTag
*IoTag_newWithName_(const char *name
)
29 IoTag
*self
= IoTag_new();
30 IoTag_name_(self
, name
);
34 void IoTag_free(IoTag
*self
)
36 //printf("io_free tag %p\n", (void *)self);
37 //printf("%s\n", self->name ? self->name : "NULL");
39 if (self
->tagCleanupFunc
)
41 (self
->tagCleanupFunc
)(self
);
50 //Stack_free(self->recyclableInstances);
54 void IoTag_name_(IoTag
*self
, const char *name
)
56 self
->name
= strcpy((char *)io_realloc(self
->name
, strlen(name
)+1), name
);
59 const char *IoTag_name(IoTag
*self
)
64 void IoTag_mark(IoTag
*self
)
67 if (Stack_count(self->recyclableInstances))
69 Stack_do_(self->recyclableInstances, (StackDoCallback *)IoObject_shouldMark);