remove WordPointer
This commit is contained in:
parent
fe504446f1
commit
e81d28c979
3 changed files with 3 additions and 17 deletions
|
@ -11,8 +11,7 @@ public class MessageReader {
|
|||
|
||||
public <T> T getRoot(FromStructReader<T> factory) {
|
||||
SegmentReader segment = new SegmentReader(this.segmentSlices[0]);
|
||||
PointerReader pointerReader = PointerReader.getRoot(segment,
|
||||
new WordPointer(this.segmentSlices[0], 0),
|
||||
PointerReader pointerReader = PointerReader.getRoot(segment, 0,
|
||||
0x7fffffff /* XXX */);
|
||||
AnyPointer.Reader any = new AnyPointer.Reader(pointerReader);
|
||||
return any.getAsStruct(factory);
|
||||
|
|
|
@ -18,10 +18,10 @@ public class PointerReader {
|
|||
}
|
||||
|
||||
public static PointerReader getRoot(SegmentReader segment,
|
||||
WordPointer location,
|
||||
int location,
|
||||
int nestingLimit) {
|
||||
// TODO bounds check
|
||||
return new PointerReader(segment, location.offset, nestingLimit);
|
||||
return new PointerReader(segment, location, nestingLimit);
|
||||
}
|
||||
|
||||
public boolean isNull() {
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package org.capnproto;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
class WordPointer {
|
||||
public final ByteBuffer buffer;
|
||||
public int offset; // in words
|
||||
|
||||
public WordPointer(ByteBuffer buffer, int offset) {
|
||||
this.buffer = buffer;
|
||||
this.offset = offset;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue