asOBJ_APP_PRIMITIVE and generic calling convention
gamedev.net
I've registered char32_t from C++ as a value type with asOBJ_APP_PRIMITIVE | asOBJ_POD | asOBJ_APP_CLASS_MORE_CONSTRUCTORS. In the generic wrapper, I use GetArgDWord/SetReturnDWord to retrieve/return the value, but the result seems wrong. The same code works correctly in native calling convention. If I use *(char32_t*)gen->GetAddressOfArg and new(gen->GetAddressOfReturnLocation()), the result will be as expected.
0 Comments ·0 Shares ·27 Views