diff options
author | jheaff1 <jheaff1@outlook.com> | 2023-06-09 16:26:34 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@github.mail.kapsi.fi> | 2023-06-12 09:44:42 +0300 |
commit | 75751dff32aa8f1a26ed57e39803f96e287c83b7 (patch) | |
tree | 3f211d5efab7d58f46ba151767438928c5ef87ec | |
parent | bf706840b4fc91121210eff8195f8d2ea6ee99b0 (diff) |
Add migration documentation for int_size option for enum fields
-rw-r--r-- | docs/migration.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/migration.md b/docs/migration.md index abe3044..646f84b 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -9,6 +9,16 @@ document. Nanopb-0.4.7 (2022-xx-xx) ------------------------- +### Add int_size option to enum fields + +**Rationale:** The `packed_enum` option does not work with MSVC due to `#pragma pack` not supporting enums with MSVC. To workaround this, enum sizes can be specified with the new `int_size` option. Note that this is only supported when generating C++. + +**Changes:** The `int_size` option can be specified for enums. + +**Required actions:** Any users concerned about the size of the generated C++ enums and are setting the int_size of enums via a wildcard (e.g. `MyMessage.* int_size=IS_8`) will need to instead set the `int_size` option for individual fields. + +**Error indications:** The size of generated C++ enums has changed. + ### Updated include path order in FindNanopb.cmake **Changes:** The include path passed to `protoc` by the CMake rules was updated. |