aboutsummaryrefslogtreecommitdiff
path: root/CHANGES.txt
diff options
context:
space:
mode:
authorkenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-04-18 00:02:12 +0000
committerkenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-04-18 00:02:12 +0000
commitcfa2d8aa87cc0b22b5092a5fb3bf7e394f85cbf1 (patch)
tree77ee2f4d02dfb43187511f3eb5a37a00c2f6f5de /CHANGES.txt
parenteb26a1efdef3f1f5e77807d456a08f3c76cc5207 (diff)
downloadprotobuf-cfa2d8aa87cc0b22b5092a5fb3bf7e394f85cbf1.tar.gz
protobuf-cfa2d8aa87cc0b22b5092a5fb3bf7e394f85cbf1.tar.bz2
protobuf-cfa2d8aa87cc0b22b5092a5fb3bf7e394f85cbf1.zip
Generate field number constants. Patch from Michael Poole.
Diffstat (limited to 'CHANGES.txt')
-rw-r--r--CHANGES.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 5020b781..e54e1fd2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,15 @@
this blob, the individual values are encoded the same way they would
be normally except without a tag before each value (thus, they are
tightly "packed").
+ * 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.
protoc
* --error_format=msvs option causes errors to be printed in Visual Studio