Hi,
As per CHANGES.txt for "2009-05-13 version 2.1.0"
<snip>
* For each field, the generated code contains an integer constant assigned
to the field number. For example, the .proto file:
message Foo { optional int bar_baz = 123; }
would generate the following constants, all with the integer value 123:
C++: Foo::kBarBazFieldNumber
Java: Foo.BAR_BAZ_FIELD_NUMBER
Python: Foo.BAR_BAZ_FIELD_NUMBER
Constants are also generated for extensions, with the same naming scheme.
These constants may be used as switch cases.
</snip>
All my .proto files use a global namespace via the "package MyProto" directive.
The constants for members of message Foo are in the MyProto::Foo
namespace while extension members of Foo are in the MyProto::
namespace (not MyProto::Foo). Is this intentional? If so, the above
changelog snippet seems to indicate otherwise.
Regards,
Srivats
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.