[protobuf] Re: Static allocation

2012-07-20 Thread Stephan Walter
The Nanopb implementation (plain C, not C++) has a max_size option: string name = 1 [(nanopb).max_size = 40]; will generate the following C declaration: char name[40]; See http://koti.kapsi.fi/~jpa/nanopb/docs/concepts.html -- You received this message because you are subscribed to the

[protobuf] Fix misdefining {non-,}NaCL Atomic64

2012-07-20 Thread Matt Tierney
Index: src/google/protobuf/stubs/atomicops.h === --- src/google/protobuf/stubs/atomicops.h (revision 423) +++ src/google/protobuf/stubs/atomicops.h (working copy) @@ -69,9 +69,9 @@ #if defined(GOOGLE_PROTOBUF_OS_NACL) //

[protobuf] Best approach for wrapping enumerated types

2012-07-20 Thread Chip Collier
Hi folks, given the simple example: --- package Blah.Messages message IFoo { enum Type { BAR=0; BAZ=1; } optional Type type = 1 [default = BAR]; } - class Foo { private: Blah::Messages::IFoo my_msg_impl; public: typedef Blah::Messages::IFoo::Type Type;

Re: [protobuf] Static allocation

2012-07-20 Thread Jeremy Swigart
I know the answer is that it doesn't support this, but here's what I'm wanting to set up to give a clearer view. Suppose you have a set of nested messages that represent the application state of an entire application, in this case a game and its entities and various other stuff. Here's a

[protobuf] Issue 398 in protobuf: Compiler Errors in VS2012 - With some solutions

2012-07-20 Thread protobuf
Status: New Owner: liuj...@google.com Labels: Type-Defect Priority-Medium New issue 398 by mjkl...@gmail.com: Compiler Errors in VS2012 - With some solutions http://code.google.com/p/protobuf/issues/detail?id=398 What steps will reproduce the problem? 1. Open the project files in VS2012

[protobuf] Some difficulties with protobuf on windows

2012-07-20 Thread Christopher Smith
I'm trying, for the first time, to get protocol buffers to work sanely on Windows. It's proving to be harder than I expected. Partly, it's my own fault: I'm building the project with VS11-beta, which I'm sure nobody has bothered to make work (and for good reason, it is right there in the name:

[protobuf] Best way to organize collections?

2012-07-20 Thread Ditat
Let's say I have .proto like this: message Dummy { required Attributes DummyAttributes = 1; required string DummyString = 2; repeated Attribute DummyAttributes2 = 3; } message Attributes { repeated Attribute List = 1; } message Attribute { required string Name = 1;

Re: [protobuf] Best way to organize collections?

2012-07-20 Thread Christopher Smith
Three points: There isn't much value in your Attributes message, so DummyAttributes2 would be the way I'd go. List is probably not an ideal name for an field, as it may overlap with other names depending on programming language. Per the style guide, field names should be like_this, not

RE: [protobuf] Best way to organize collections?

2012-07-20 Thread Ivan Demkovitch
Valid points! I use Attributes by itself also. So, I need that message. Question is should I use that collection message inside other messages where I may need collection of Attribute? Naming… well. I use same .proto file in .NET and it all comes from POJO which I used for JSON so I’m going

[protobuf] Issue 399 in protobuf: Add support for using batch files to wrap plugins on Windows

2012-07-20 Thread protobuf
Status: New Owner: liuj...@google.com Labels: Type-Defect Priority-Medium New issue 399 by cbsm...@gmail.com: Add support for using batch files to wrap plugins on Windows http://code.google.com/p/protobuf/issues/detail?id=399 Windows has this annoying requirement that plugins be .exe's,

[protobuf] Re: Some difficulties with protobuf on windows

2012-07-20 Thread Christopher Smith
On Fri, Jul 20, 2012 at 5:41 PM, Christopher Smith cbsm...@gmail.com wrote: 4) Plugins have to be exe's. That kind of sucks if the plugin is in a scripting language. I was looking at adding logic so that if you use the --plugin flag, and if the executable's name ends in .cmd or .bat, it would