static VALUE function_call(int argc, VALUE* argv, VALUE self) { Function* fn; Data_Get_Struct(self, Function, fn); return rbffi_CallFunction(argc, argv, fn->memory.address, fn->info); }
static VALUE rbffi_InvokeLLLrL(int argc, VALUE* argv, void* function, FunctionType* fnInfo) { L (*fn)(L, L, L) = (L (*)(L, L, L)) function; L result; checkArity(argc, 3); if (unlikely(!isLongValue(argv[0])) || unlikely(!isLongValue(argv[1])) || unlikely(!isLongValue(argv[2]))) { return rbffi_CallFunction(argc, argv, function, fnInfo); } result = (*fn)(LARG(fnInfo, argv, 0), LARG(fnInfo, argv, 1), LARG(fnInfo, argv, 2)); return returnL(fnInfo, &result); }