All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jruby.ext.ffi.jffi.FastIntMethodZeroArg Maven / Gradle / Ivy

There is a newer version: 9.4.7.0
Show newest version

package org.jruby.ext.ffi.jffi;

import com.kenai.jffi.Function;
import org.jruby.RubyModule;
import org.jruby.runtime.Block;
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;

final class FastIntMethodZeroArg extends FastIntMethod {
    public FastIntMethodZeroArg(RubyModule implementationClass, Function function,
            IntResultConverter resultConverter, IntParameterConverter[] parameterConverters) {
        super(implementationClass, function, resultConverter, parameterConverters);
        
    }

    @Override
    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {
        arity.checkArity(context.getRuntime(), args);
        return resultConverter.fromNative(context, invoker.invokeVrI(function));
    }

    @Override
    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule klazz, String name) {
        return resultConverter.fromNative(context, invoker.invokeVrI(function));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy