| 47 | |
| 48 | #ifndef mxLink |
| 49 | txSlot* fxNextHostAccessorProperty(txMachine* the, txSlot* property, txCallback get, txCallback set, txID id, txFlag flag) |
| 50 | { |
| 51 | txSlot *getter = NULL, *setter = NULL, *home = the->stack, *slot; |
| 52 | if (get) { |
| 53 | getter = fxBuildHostFunction(the, get, 0, XS_NO_ID); |
| 54 | slot = mxFunctionInstanceHome(getter); |
| 55 | slot->value.home.object = home->value.reference; |
| 56 | fxRenameFunction(the, getter, id, 0, XS_NO_ID, "get "); |
| 57 | } |
| 58 | if (set) { |
| 59 | setter = fxBuildHostFunction(the, set, 1, XS_NO_ID); |
| 60 | slot = mxFunctionInstanceHome(setter); |
| 61 | slot->value.home.object = home->value.reference; |
| 62 | fxRenameFunction(the, setter, id, 0, XS_NO_ID, "set "); |
| 63 | } |
| 64 | property = property->next = fxNewSlot(the); |
| 65 | property->flag = flag; |
| 66 | property->ID = id; |
| 67 | property->kind = XS_ACCESSOR_KIND; |
| 68 | property->value.accessor.getter = getter; |
| 69 | property->value.accessor.setter = setter; |
| 70 | if (set) |
| 71 | mxPop(); |
| 72 | if (get) |
| 73 | mxPop(); |
| 74 | return property; |
| 75 | } |
| 76 | |
| 77 | txSlot* fxNextHostFunctionProperty(txMachine* the, txSlot* property, txCallback call, txInteger length, txID id, txFlag flag) |
| 78 | { |
no test coverage detected