summaryrefslogtreecommitdiffstats
path: root/docs/migration.rst
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2015-01-11 19:38:05 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2015-01-11 19:45:16 +0200
commit8d12fecc7e4fb6899eb0d013abe0d6a5e03447ce (patch)
treecdb069ee1435a8a00d790fef027d7865ee6e0199 /docs/migration.rst
parent8ef0392231c071a92ae78113763c0b1d61eafb1f (diff)
New generator options for oneofs: allow skipping or generating as normal 'optional' fields.
The behaviour with no_unions:true is the same as of nanopb 0.3.1 and earlier.
Diffstat (limited to 'docs/migration.rst')
-rw-r--r--docs/migration.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/migration.rst b/docs/migration.rst
index 5f7246f5..d5ded643 100644
--- a/docs/migration.rst
+++ b/docs/migration.rst
@@ -11,6 +11,25 @@ are included, in order to make it easier to find this document.
.. contents ::
+Nanopb-0.3.2 (2015-01-xx)
+=========================
+
+Add support for OneOfs
+----------------------
+**Rationale:** Previously nanopb did not support the *oneof* construct in
+*.proto* files. Those fields were generated as regular *optional* fields.
+
+**Changes:** OneOfs are now generated as C unions. Callback fields are not
+supported inside oneof and generator gives an error.
+
+**Required actions:** The generator option *no_unions* can be used to restore old
+behaviour and to allow callbacks to be used. To use unions, one change is
+needed: use *which_xxxx* field to detect which field is present, instead
+of *has_xxxx*. Compare the value against *MyStruct_myfield_tag*.
+
+**Error indications:** Generator error: "Callback fields inside of oneof are
+not supported". Compiler error: "Message" has no member named "has_xxxx".
+
Nanopb-0.3.0 (2014-08-26)
=========================