/** * Gets the native return type of this function. * * @return The native return type of this function. */ public final Type getReturnType() { return callContext.getReturnType(); }
/** * Gets the native return type of this function. * * @return The native return type of this function. */ public final Type getReturnType() { return callContext.getReturnType(); }
/** * Gets the native return type of this function. * * @return The native return type of this function. */ public final Type getReturnType() { return callContext.getReturnType(); }
/** * Invokes a function that returns a C struct by value. * * @param ctx The call context which describes how to call the native function. * @param function The address of the native function to invoke. * @param buffer The parameter buffer. * @return A byte array with the return value encoded in native byte order. */ public final byte[] invokeStruct(CallContext ctx, long function, HeapInvocationBuffer buffer) { byte[] returnBuffer = new byte[ctx.getReturnType().size()]; invokeStruct(ctx, function, buffer, returnBuffer, 0); return returnBuffer; }
/** * Invokes a function that returns a C struct by value. * * @param ctx The call context which describes how to call the native function. * @param function The address of the native function to invoke. * @param buffer The parameter buffer. * @return A byte array with the return value encoded in native byte order. */ public final byte[] invokeStruct(CallContext ctx, long function, HeapInvocationBuffer buffer) { byte[] returnBuffer = new byte[ctx.getReturnType().size()]; invokeStruct(ctx, function, buffer, returnBuffer, 0); return returnBuffer; }
/** * Invokes a function that returns a C struct by value. * * @param ctx The call context which describes how to call the native function. * @param function The address of the native function to invoke. * @param buffer The parameter buffer. * @return A byte array with the return value encoded in native byte order. */ public final byte[] invokeStruct(CallContext ctx, long function, HeapInvocationBuffer buffer) { byte[] returnBuffer = new byte[ctx.getReturnType().size()]; invokeStruct(ctx, function, buffer, returnBuffer, 0); return returnBuffer; }
public void setStructReturn(long value) { IO.copyMemory(value, retval, callContext.getReturnType().size()); }
public void setStructReturn(long value) { IO.copyMemory(value, retval, callContext.getReturnType().size()); }
public void setStructReturn(byte[] data, int offset) { IO.putByteArray(retval, data, offset, callContext.getReturnType().size()); }
public void setStructReturn(long value) { IO.copyMemory(value, retval, callContext.getReturnType().size()); }
public void setStructReturn(byte[] data, int offset) { IO.putByteArray(retval, data, offset, callContext.getReturnType().size()); }
public void setStructReturn(byte[] data, int offset) { IO.putByteArray(retval, data, offset, callContext.getReturnType().size()); }
if (!(callContext.getReturnType() instanceof Type.Builtin)) { return null; switch (callContext.getReturnType().type()) { case Foreign.TYPE_SINT8: case Foreign.TYPE_UINT8:
if (!(callContext.getReturnType() instanceof Type.Builtin)) { return null; switch (callContext.getReturnType().type()) { case Foreign.TYPE_SINT8: case Foreign.TYPE_UINT8:
if (!(callContext.getReturnType() instanceof Type.Builtin)) { return null; switch (callContext.getReturnType().type()) { case Foreign.TYPE_SINT8: case Foreign.TYPE_UINT8: