• jasonh+personal@google.com's avatar
    Fix Issue 136: the memoized serialized size for packed fields may not · 9951233e
    jasonh+personal@google.com authored
    be properly set. writeTo() may be invoked without a call to
    getSerializedSize(), so the generated serialization methods would
    write a length of 0 for non-empty packed fields. Just call
    getSerializedSize() at the beginning of writeTo(): although this
    means that we may compute the byte size needlessly when there
    are no packed fields, in practice, getSerializedSize() will
    already have been called - all of the writeTo() wrappers in
    AbstractMessageLite invoke it.
    
    Tested: new unittest case in WireFormatTest.java now passes
    9951233e
Name
Last commit
Last update
benchmarks Loading commit data...
editors Loading commit data...
examples Loading commit data...
java Loading commit data...
m4 Loading commit data...
python Loading commit data...
src Loading commit data...
vsprojects Loading commit data...
CHANGES.txt Loading commit data...
CONTRIBUTORS.txt Loading commit data...
COPYING.txt Loading commit data...
INSTALL.txt Loading commit data...
Makefile.am Loading commit data...
README.txt Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
generate_descriptor_proto.sh Loading commit data...
post_process_dist.sh Loading commit data...
protobuf-lite.pc.in Loading commit data...
protobuf.pc.in Loading commit data...