Skip to content

Commit 28a661e

Browse files
committed
Speed up zero arg FFI invocations
git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@7436 961051c9-f516-0410-bf72-c9f7e237a7b7
1 parent 68015c1 commit 28a661e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/org/jruby/ext/ffi/jna/DynamicMethodZeroArg.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
* @author wayne
4141
*/
4242
class DynamicMethodZeroArg extends JNADynamicMethod {
43-
private static final Object[] NATIVE_ARGUMENTS = {};
4443

4544
public DynamicMethodZeroArg(RubyModule implementationClass, Function function,
4645
FunctionInvoker functionInvoker) {
@@ -50,11 +49,11 @@ public DynamicMethodZeroArg(RubyModule implementationClass, Function function,
5049
@Override
5150
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {
5251
arity.checkArity(context.getRuntime(), args);
53-
return functionInvoker.invoke(context.getRuntime(), function, NATIVE_ARGUMENTS);
52+
return functionInvoker.invoke(context.getRuntime(), function, null);
5453
}
5554

5655
@Override
5756
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name) {
58-
return functionInvoker.invoke(context.getRuntime(), function, NATIVE_ARGUMENTS);
57+
return functionInvoker.invoke(context.getRuntime(), function, null);
5958
}
6059
}

0 commit comments

Comments
 (0)