forked from TrueCloudLab/frostfs-api-go
[#59] util: Restore backwards compatibility in NestedStructureMarshal()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
498877e378
commit
9cc2095446
2 changed files with 28 additions and 14 deletions
|
@ -211,7 +211,7 @@ func (c *ObjectSessionContext) StableMarshal(buf []byte) []byte {
|
|||
}
|
||||
|
||||
offset := proto.EnumMarshal(objectCtxVerbField, buf, int32(c.verb))
|
||||
proto.NestedStructureMarshal(objectCtxTargetField, buf[offset:], objectSessionContextTarget{
|
||||
proto.NestedStructureMarshalUnchecked(objectCtxTargetField, buf[offset:], objectSessionContextTarget{
|
||||
cnr: c.cnr,
|
||||
objs: c.objs,
|
||||
})
|
||||
|
@ -225,7 +225,7 @@ func (c *ObjectSessionContext) StableSize() (size int) {
|
|||
}
|
||||
|
||||
size += proto.EnumSize(objectCtxVerbField, int32(c.verb))
|
||||
size += proto.NestedStructureSize(objectCtxTargetField, objectSessionContextTarget{
|
||||
size += proto.NestedStructureSizeUnchecked(objectCtxTargetField, objectSessionContextTarget{
|
||||
cnr: c.cnr,
|
||||
objs: c.objs,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue