| 679 | } |
| 680 | |
| 681 | txSlot* fxNewHostObject(txMachine* the, txDestructor theDestructor) |
| 682 | { |
| 683 | txSlot* anInstance; |
| 684 | txSlot* aProperty; |
| 685 | |
| 686 | mxPushUndefined(); |
| 687 | |
| 688 | anInstance = fxNewSlot(the); |
| 689 | anInstance->kind = XS_INSTANCE_KIND; |
| 690 | anInstance->value.instance.garbage = C_NULL; |
| 691 | anInstance->value.instance.prototype = mxObjectPrototype.value.reference; |
| 692 | the->stack->value.reference = anInstance; |
| 693 | the->stack->kind = XS_REFERENCE_KIND; |
| 694 | |
| 695 | aProperty = anInstance->next = fxNewSlot(the); |
| 696 | aProperty->flag = XS_INTERNAL_FLAG; |
| 697 | aProperty->kind = XS_HOST_KIND; |
| 698 | aProperty->value.host.data = C_NULL; |
| 699 | aProperty->value.host.variant.destructor = theDestructor; |
| 700 | |
| 701 | return anInstance; |
| 702 | } |
| 703 | |
| 704 | txInteger fxGetHostBufferLength(txMachine* the, txSlot* slot) |
| 705 | { |
no test coverage detected