mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 23:20:02 +00:00
Fix Python min alignment
This was accidentally deleted in:
9fa8245e81
Change-Id: I8cad721e075279f6a67aca81259f73fb75aba482
This commit is contained in:
@@ -514,6 +514,13 @@ class Builder(object):
|
|||||||
"""Finish finalizes a buffer, pointing to the given `rootTable`."""
|
"""Finish finalizes a buffer, pointing to the given `rootTable`."""
|
||||||
N.enforce_number(rootTable, N.UOffsetTFlags)
|
N.enforce_number(rootTable, N.UOffsetTFlags)
|
||||||
|
|
||||||
|
prepSize = N.UOffsetTFlags.bytewidth
|
||||||
|
if file_identifier is not None:
|
||||||
|
prepSize += N.Int32Flags.bytewidth
|
||||||
|
if sizePrefix:
|
||||||
|
prepSize += N.Int32Flags.bytewidth
|
||||||
|
self.Prep(self.minalign, prepSize)
|
||||||
|
|
||||||
if file_identifier is not None:
|
if file_identifier is not None:
|
||||||
self.Prep(N.UOffsetTFlags.bytewidth, encode.FILE_IDENTIFIER_LENGTH)
|
self.Prep(N.UOffsetTFlags.bytewidth, encode.FILE_IDENTIFIER_LENGTH)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user