mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-12 16:00:59 +00:00
Unsigned types in Java now return bigger size signed types.
(Java doesn't support unsigned types). ubyte/ushort return as int uint returns as long (all with correct masking) ulong still returns as long, as before. Tested: on Linux & Windows. Bug 17521464 Change-Id: Id6bc8f38fc8c1a2f4e6733c6980dc6b6e322b452
This commit is contained in:
@@ -30,7 +30,16 @@ func (rcv *Stat) Val() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func StatStart(builder *flatbuffers.Builder) { builder.StartObject(2) }
|
||||
func (rcv *Stat) Count() uint16 {
|
||||
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
||||
if o != 0 {
|
||||
return rcv._tab.GetUint16(o + rcv._tab.Pos)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func StatStart(builder *flatbuffers.Builder) { builder.StartObject(3) }
|
||||
func StatAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT) { builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(id), 0) }
|
||||
func StatAddVal(builder *flatbuffers.Builder, val int64) { builder.PrependInt64Slot(1, val, 0) }
|
||||
func StatAddCount(builder *flatbuffers.Builder, count uint16) { builder.PrependUint16Slot(2, count, 0) }
|
||||
func StatEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { return builder.EndObject() }
|
||||
|
||||
Reference in New Issue
Block a user