Closed GoogleCodeExporter closed 9 years ago
This is related to Issue 2. I'm only now starting to see how confusing both the
field encoder and the field decoder interfaces are.
The issue is that the "field" passed to your callback function describes a
pb_callback_t type field, whereas the pb_enc_varint() expects an integer field.
This distinction makes sense internally, but in the library API it is terribly
confusing.
Please use pb_encode_varint() instead. It has a cleaner interface and functions
identically (it takes a 64-bit parameter, but works for encoding 32-bit
parameters also as the binary format does not care about field width). I'll
have to add thin wrappers to make sint32, fixed32 etc. encoding easy also.
Original comment by Petteri.Aimonen
on 1 Mar 2012 at 10:25
This issue was closed by revision 9fbe9a5de30c.
Original comment by Petteri.Aimonen
on 1 Mar 2012 at 11:51
Original issue reported on code.google.com by
roger.ka...@gmail.com
on 1 Mar 2012 at 9:09Attachments: