Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dfec566cab2f
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6d924dc60843
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Jun 10, 2017

  1. Copy the full SHA
    187c9e8 View commit details
  2. Copy the full SHA
    6d924dc View commit details
Showing with 5 additions and 1 deletion.
  1. +4 −0 core/src/main/java/org/jruby/ext/ffi/CallbackInfo.java
  2. +1 −1 core/src/main/java/org/jruby/ext/ffi/jffi/NativeCallbackFactory.java
4 changes: 4 additions & 0 deletions core/src/main/java/org/jruby/ext/ffi/CallbackInfo.java
Original file line number Diff line number Diff line change
@@ -110,6 +110,10 @@ public static final IRubyObject newCallbackInfo(ThreadContext context, IRubyObje
+ returnType.getMetaClass().getName() + " (expected FFI::Type)");
}

if (returnType instanceof MappedType) {
returnType = ((MappedType) returnType).getRealType();
}

if (!(paramTypes instanceof RubyArray)) {
throw context.runtime.newTypeError("wrong argument type "
+ paramTypes.getMetaClass().getName() + " (expected Array)");
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ private final NativeFunctionInfo newFunctionInfo(Ruby runtime, CallbackInfo cbIn
}

if (!isReturnTypeValid(cbInfo.getReturnType()) || FFIUtil.getFFIType(cbInfo.getReturnType()) == null) {
runtime.newTypeError("invalid callback return type: " + cbInfo.getReturnType());
throw runtime.newTypeError("invalid callback return type: " + cbInfo.getReturnType());
}

return new NativeFunctionInfo(runtime, cbInfo.getReturnType(), cbInfo.getParameterTypes(),