Package org.jruby.ext.ffi

Examples of org.jruby.ext.ffi.NullMemoryIO


    private final Ruby runtime;

    static final DirectMemoryIO wrap(Ruby runtime, long address) {
        return address != 0
                ? new NativeMemoryIO(runtime, address)
                : new NullMemoryIO(runtime);
    }
View Full Code Here


        }

        return new Symbol(context.getRuntime(), this, sym,
                address != 0
                ? new DataSymbolMemoryIO(context.getRuntime(), this, address)
                : new NullMemoryIO(context.getRuntime()));
    }
View Full Code Here

        } else if (type instanceof StructByValue) {
            StructByValue sbv = (StructByValue) type;
            final long address = buffer.getStruct(index);
            DirectMemoryIO memory = address != 0
                    ? new BoundedNativeMemoryIO(runtime, address, type.getNativeSize())
                    : new NullMemoryIO(runtime);

            return sbv.getStructClass().newInstance(runtime.getCurrentContext(),
                        new IRubyObject[] { new Pointer(runtime, memory) },
                        Block.NULL_BLOCK);
View Full Code Here

TOP

Related Classes of org.jruby.ext.ffi.NullMemoryIO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.