: runtime.getNil();
} 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) },