Fixed a lazySlot bug where lazy slots in different objects end up pointing to the...
[io/quag.git] / libs / iovm / source / IoCFunction.h
blobb28936d3635a238fca053475e15012a1c51b6f1c
1 /*#io
2 docCopyright("Steve Dekorte", 2002)
3 docLicense("BSD revised")
4 */
6 #ifndef IOCFUNCTION_DEFINED
7 #define IOCFUNCTION_DEFINED 1
9 #include "IoVMApi.h"
11 #include "Common.h"
12 #include "IoObject.h"
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
18 #define ISCFUNCTION(self) \
19 IoObject_hasCloneFunc_(self, (IoTagCloneFunc *)IoCFunction_rawClone)
21 #define IOCFUNCTION(func, tag) IoCFunction_newWithFunctionPointer_tag_name_(IOSTATE, (IoUserFunction *)func, tag, "?")
23 typedef IoObject *(IoUserFunction)(IoObject *, IoObject *, IoMessage *);
24 typedef IoObject IoCFunction;
26 typedef struct
28 IoTag *typeTag; // pointer to tag of type excepted for self value to have as data
29 IoUserFunction *func;
30 IoSymbol *uniqueName;
31 } IoCFunctionData;
33 IOVM_API IoCFunction *IoCFunction_proto(void *state);
34 IOVM_API void IoCFunction_protoFinish(void *state);
35 IOVM_API IoCFunction *IoCFunction_rawClone(IoCFunction *self);
36 IOVM_API IoCFunction *IoCFunction_newWithFunctionPointer_tag_name_(void *state, IoUserFunction *s, IoTag *typeTag, const char *name);
38 IOVM_API void IoCFunction_mark(IoCFunction *self);
39 IOVM_API void IoCFunction_free(IoCFunction *self);
40 IOVM_API void IoCFunction_print(IoCFunction *self);
42 IOVM_API IoObject *IoCFunction_id(IoCFunction *self, IoObject *locals, IoMessage *m);
43 IOVM_API IoObject *IoCFunction_uniqueName(IoCFunction *self, IoObject *locals, IoMessage *m);
44 IOVM_API IoObject *IoCFunction_typeName(IoCFunction *self, IoObject *locals, IoMessage *m);
45 IOVM_API IoObject *IoCFunction_equals(IoCFunction *self, IoObject *locals, IoMessage *m);
46 IOVM_API IoObject *IoCFunction_activate(IoCFunction *self, IoObject *target, IoObject *locals, IoMessage *m, IoObject *slotContext);
48 IOVM_API IoObject *IoCFunction_performOn(IoCFunction *self, IoObject *locals, IoMessage *m);
50 #ifdef __cplusplus
52 #endif
53 #endif