[protobuf] Possible bug in the compiler api

2014-10-27 Thread Josh Strickland
I have built a autocode generator that uses the protobuffer's api in combination with template code to autogenerate complete stub code for working with the network code from the Qt libraries. It worked flawlessly with a past version of the protobuffer (from more than a year ago, but not sure

possible bug?

2009-07-29 Thread Sushil Shelly
I have a simple enumeration in my dot-proto as follows message Bar { required string name = 1; required string device = 2; } enum msg State { IDLE = 0; BUSY = 1; } message Foo { required State state = 1; required Bar bar = 2; } now i set the required fields by using the helper

Re: possible bug?

2009-07-29 Thread Kenton Varda
Probably you are treating the bytes as a NUL-terminated string somewhere, and so the message is being cut short at the zero. Protocol messages can contain NUL (zero-value) bytes, so you cannot pass an encoded protocol message as a plain char* -- you must keep track of the size. On Wed, Jul 29,

Re: possible bug?

2009-07-29 Thread Kenton Varda
Also, in all likelihood the ParseFrom*() call is failing, but you aren't checking the return value. On Wed, Jul 29, 2009 at 4:54 PM, Kenton Varda ken...@google.com wrote: Probably you are treating the bytes as a NUL-terminated string somewhere, and so the message is being cut short at the