Re: [protobuf] message forward declaration

2011-01-21 Thread Jason Hsueh
There are many things that need to be read from imported .proto files to determine if the .proto is valid, or to produce correct code. e.g.: - need to differentiate between enum and message imports - when referencing a qualified type like foo.bar.Baz.Qux, you need to know what components are packag

Re: [protobuf] Problem with accents in python while unpacking a message

2011-01-21 Thread Jason Hsueh
Can you provide a small, self-contained reproduction of the program? On Thu, Jan 20, 2011 at 10:39 AM, Louhike wrote: > Hi, > I'm using Google Protobuf with python on a project. > My problem is I get an error while my program tries to build an > instance with the function google.protobuf.text_fo

Re: [protobuf] java_multiple_files option

2011-01-21 Thread Jason Hsueh
This contains file-level code. In addition to any file-scope extensions you may have defined, it provides the file's descriptor and initialization code for the .proto file. On Thu, Jan 20, 2011 at 2:20 AM, Antoine DESSAIGNE < antoine.dessai...@gmail.com> wrote: > Hi everyone, > > First I want to

Re: [protobuf] Dealing with Corrupted Protocol Buffers

2011-01-21 Thread Jason Hsueh
It will be rather difficult to correct for the error. The point at which the parse fails may not be the point of corruption: e.g., the corruption may be in a byte that is part of a varint, and the continuation bit may be set when it shouldn't. Similarly you could have a corruption in the length del

Re: [protobuf] cannot get extensions from serialized proto -- please help

2011-01-21 Thread Jason Hsueh
You didn't provide a code snippet, so it's hard to say, but I would guess that you need to provide an ExtensionRegistry and pass that to the parsing method. (It looks like you are working in Java) e.g. ExtensionRegistry extensionRegistry = ExtensionRegistry.newInstance(); YourFileContainerProto.re

[protobuf] cannot get extensions from serialized proto -- please help

2011-01-21 Thread hp
test below is failing..please please help message Results { extensions 100 to max } message Item1 { extend Resultes { repeated Item1 items = 100; } } message Item2 { extend Resultes { repeated Item2 items = 100; } } Results.getExtension(items) doe