struct Argb{ uint32_t v;};struct Image{ err_t clear(Argb);};
Is this possible without wrappers? When registering Image::clear() method I get an error:
ERR : (0, 0) : Don't support passing type 'Argb' by value to application
I'm using this to register Argb and Image:
_TYPE("Argb", Argb, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CA);_TYPE("Image", Image, asOBJ_VALUE | asOBJ_APP_CLASS_CDA);_METHODM("err clear(Argb)", Image, clear, err_t, (Argb));// The _TYPE and _METHODM are macros.#define _REG(code) do { int _Result = (code); assert(_Result >= 0); } while (0)#define _TYPE(name, type, flags) _REG(engine->RegisterObjectType(name, sizeof(type), flags))#define _METHODM(prototype, c, m, r, p) _REG(engine->RegisterObjectMethod(_T, prototype, asMETHODPR(c, m, p, r), asCALL_THISCALL))
Problem is that it's passed as a value, on x64 platform this means passing it through register.