support for scalar mutators

This commit is contained in:
Maor Itzkovitch
2015-08-01 12:38:47 +03:00
parent 6e192fa408
commit 81c2b185ef
9 changed files with 81 additions and 2 deletions

View File

@@ -9,7 +9,9 @@ public sealed class Test : Struct {
public Test __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; }
public short A { get { return bb.GetShort(bb_pos + 0); } }
public void MutateA(short a) { bb.PutShort(bb_pos + 0); }
public sbyte B { get { return bb.GetSbyte(bb_pos + 2); } }
public void MutateB(sbyte b) { bb.PutSbyte(bb_pos + 2); }
public static int CreateTest(FlatBufferBuilder builder, short A, sbyte B) {
builder.Prep(2, 4);