X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=docs%2Fmigration.rst;h=5f7246f5136881daf984fc0fe107e399b14e73c4;hb=fa444be4243b2e1f0f6ee22798ddbf0c85e54422;hp=800bc1f9c01788c6cb79ffb2ae0bb1e674b24a11;hpb=1dd9f1900fca0c137324c05a9421f1ba180b2470;p=apps%2Fagl-service-can-low-level.git diff --git a/docs/migration.rst b/docs/migration.rst index 800bc1f9..5f7246f5 100644 --- a/docs/migration.rst +++ b/docs/migration.rst @@ -11,7 +11,7 @@ are included, in order to make it easier to find this document. .. contents :: -Nanopb-0.3.0 (2014-09-xx) +Nanopb-0.3.0 (2014-08-26) ========================= Separate field iterator logic to pb_common.c @@ -44,7 +44,45 @@ The size of the type will be controlled by the *PB_FIELD_16BIT* and **Required actions:** Regenerate all *.pb.h* files. In some cases casts to the *pb_size_t* type may need to be added in the user code when accessing the -*_count* fields. +*_count* fields. + +**Error indications:** Incorrect data at runtime, crashes. But note that other +changes in the same version already require regenerating the files and have +better indications of errors, so this is only an issue for development +versions. + +Renamed some macros and identifiers +----------------------------------- +**Rationale:** Some names in nanopb core were badly chosen and conflicted with +ISO C99 reserved names or lacked a prefix. While they haven't caused trouble +so far, it is reasonable to switch to non-conflicting names as these are rarely +used from user code. + +**Changes:** The following identifier names have changed: + + * Macros: + + * STATIC_ASSERT(x) -> PB_STATIC_ASSERT(x) + * UNUSED(x) -> PB_UNUSED(x) + + * Include guards: + + * _PB_filename_ -> PB_filename_INCLUDED + + * Structure forward declaration tags: + + * _pb_field_t -> pb_field_s + * _pb_bytes_array_t -> pb_bytes_array_s + * _pb_callback_t -> pb_callback_s + * _pb_extension_type_t -> pb_extension_type_s + * _pb_extension_t -> pb_extension_s + * _pb_istream_t -> pb_istream_s + * _pb_ostream_t -> pb_ostream_s + +**Required actions:** Regenerate all *.pb.c* files. If you use any of the above +identifiers in your application code, perform search-replace to the new name. + +**Error indications:** Compiler errors on lines with the macro/type names. Nanopb-0.2.9 (2014-08-09) ========================= @@ -113,12 +151,12 @@ Callback function signature as *void\**. This allowed passing of any data, but made it unnecessarily complex to return a pointer from callback. -**Changes:** The callback function parameter was changed to *void\**. +**Changes:** The callback function parameter was changed to *void\*\**. **Required actions:** You can continue using the old callback style by defining *PB_OLD_CALLBACK_STYLE*. Recommended action is to: - * Change the callback signatures to contain *void\** for decoders and + * Change the callback signatures to contain *void\*\** for decoders and *void \* const \** for encoders. * Change the callback function body to use *\*arg* instead of *arg*.