| 794 | } |
| 795 | |
| 796 | void *asCScriptObject::GetAddressOfProperty(asUINT prop) |
| 797 | { |
| 798 | if( prop >= objType->properties.GetLength() ) |
| 799 | return 0; |
| 800 | |
| 801 | // Objects are stored by reference, so this must be dereferenced |
| 802 | asCDataType *dt = &objType->properties[prop]->type; |
| 803 | if( dt->IsObject() && !dt->IsObjectHandle() && |
| 804 | (dt->IsReference() || dt->GetTypeInfo()->flags & asOBJ_REF) ) |
| 805 | return *(void**)(((char*)this) + objType->properties[prop]->byteOffset); |
| 806 | |
| 807 | return (void*)(((char*)this) + objType->properties[prop]->byteOffset); |
| 808 | } |
| 809 | |
| 810 | void asCScriptObject::EnumReferences(asIScriptEngine *engine) |
| 811 | { |