mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-04 12:43:24 +00:00
Make Monster's Color unsigned (#5318)
- update C++ monster_test::Color to unsigned type - update Go Color:ubyte in the go_test.go - add workaround for unsigned enum in java test - sync generate.bat and generate.sh
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
b701c7d56e
commit
f9ebfcb9c4
@@ -24,12 +24,12 @@ end
|
||||
function TestSimpleTableWithEnum_mt:Color()
|
||||
local o = self.view:Offset(4)
|
||||
if o ~= 0 then
|
||||
return self.view:Get(flatbuffers.N.Int8, o + self.view.pos)
|
||||
return self.view:Get(flatbuffers.N.Uint8, o + self.view.pos)
|
||||
end
|
||||
return 2
|
||||
end
|
||||
function TestSimpleTableWithEnum.Start(builder) builder:StartObject(1) end
|
||||
function TestSimpleTableWithEnum.AddColor(builder, color) builder:PrependInt8Slot(0, color, 2) end
|
||||
function TestSimpleTableWithEnum.AddColor(builder, color) builder:PrependUint8Slot(0, color, 2) end
|
||||
function TestSimpleTableWithEnum.End(builder) return builder:EndObject() end
|
||||
|
||||
return TestSimpleTableWithEnum -- return the module
|
||||
Reference in New Issue
Block a user