Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 
 package org.jruby.ext.ffi.jffi;
 
 import org.jruby.Ruby;

Holds information for creating JFFI functions
    final org.jruby.ext.ffi.Type returnType;
    final org.jruby.ext.ffi.Type[] parameterTypes;
    public NativeFunctionInfo(Ruby runtimeorg.jruby.ext.ffi.Type returnType,
            org.jruby.ext.ffi.Type[] parameterTypesCallingConvention convention) {
        this. = returnType;
        this. = parameterTypes;
        this. = FFIUtil.getFFIType(returnType);
        if ( == null) {
            throw runtime.newTypeError("invalid FFI return type: " + returnType);
        }
        this. = new com.kenai.jffi.Type[parameterTypes.length];
        for (int i = 0; i < parameterTypes.length; ++i) {
            [i] = FFIUtil.getFFIType(parameterTypes[i]);
            if ([i] == null) {
                throw runtime.newTypeError("invalid FFI parameter type: " + parameterTypes[i]);
            }
        }
        this. = CallContextCache.getInstance().getCallContext(convention);
        this. = convention;
    }
New to GrepCode? Check out our FAQ X