Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/pb.h
AgeCommit message (Collapse)Author
2023-11-11Setting version to 0.4.9-devPetteri Aimonen
2023-11-11Publishing nanopb-0.4.8nanopb-0.4.80.4.8Petteri Aimonen
2022-12-23Use static_assert keyword on MSVC in C89 mode (#843)Petteri Aimonen
2022-12-11Setting version to 0.4.8-devPetteri Aimonen
2022-12-11Publishing nanopb-0.4.7nanopb-0.4.70.4.7Petteri Aimonen
2022-09-20Allow including inside of extern CJussi Keranen
2022-05-30Setting version to 0.4.7-dev, cleanup changelogPetteri Aimonen
2022-05-30Publishing nanopb-0.4.6nanopb-0.4.60.4.6.40.4.6Petteri Aimonen
2022-03-29Fix some build errors due to static assert changePetteri Aimonen
2022-03-28Fix build on MSVCPetteri Aimonen
2022-03-28Use C11 static assert mechanism by default (#761, #766)Petteri Aimonen
Hopefully this works better by default and is less confusing when it doesn't. Added notes to migration document on how to restore previous behavior.
2021-12-09Fixed small spelling mistakes.Slavey Karadzhov
2021-08-18Improve optimization for little-endian platforms.Petteri Aimonen
Previously there was a fast path for little endian platforms in pb_decode_fixed64() but not in pb_encode_fixed64(). Also the macros used for the check didn't trigger on GCC. Macro checks were expanded to cover all common compilers and now it is possible to specify PB_LITTLE_ENDIAN_8BIT manually if it is not automatically detected.
2021-07-24feat: Change NANOPB_VERSION macro to stringDavid Sabatie
2021-06-15Use 'static_assert' keyword for iar (#679)ghseb
Co-authored-by: Sebastian Stockhammer <sebastian.stockhammer@rosenberger.com>
2021-06-03Move PB_WT_PACKED definition to the header (#671)Petteri Aimonen
Casting integer values outside of the enum range is undefined behavior. Normally most platforms do allocate at least 8 bits per enum and this is not known to cause problems so far, but it gave compiler warnings.
2021-03-22Setting version to 0.4.6-devPetteri Aimonen
2021-03-22Publishing nanopb-0.4.5Petteri Aimonen
2020-11-25Setting version to 0.4.5-devPetteri Aimonen
2020-11-25Publishing nanopb-0.4.4nanopb-0.4.40.4.4Petteri Aimonen
2020-09-21Setting version to 0.4.4-devPetteri Aimonen
2020-09-21Publishing nanopb-0.4.3nanopb-0.4.30.4.3Petteri Aimonen
2020-06-24Update pb_msgdesc_t definition to improve performance.Petteri Aimonen
1. Include precalculated required field count and largest tag, to avoid calculating them at runtime. 2. Reorder fields for better natural alignment (pointers first in struct) 3. Remove PB_PACKED_STRUCT specification, no longer needed.
2020-06-23Setting version to 0.4.3-devPetteri Aimonen
2020-06-23Publishing nanopb-0.4.2nanopb-0.4.20.4.2Petteri Aimonen
2020-06-22Fix macro name conflicts (ATMEGA32U4 UENUM and more) (#522)Petteri Aimonen
For brevity, it is nice to use short names like "UENUM" in the FIELDLIST definition in .pb.h files. To avoid conflict with macro names defined by the platform we must add a PB_ namespace prefix on the first level of macro expansion in pb.h.
2020-02-02Setting version to 0.4.2-devPetteri Aimonen
2020-02-02Publishing nanopb-0.4.1nanopb-0.4.10.4.1Petteri Aimonen
2020-01-31Remove PB_FIELDINFO_WIDTH option (#473)Petteri Aimonen
2020-01-29Fix compilation error on platforms without uint8_t, add test. (#485)Petteri Aimonen
2020-01-02Make descriptorsize:DS_8 work, add to AllTypes test case.Petteri Aimonen
2020-01-02Make fixed_count option work when combined with FT_POINTER.Petteri Aimonen
Also added to AllTypes testcase.
2019-12-29Fix bug with field numbers >255 (#407)Petteri Aimonen
When using descriptor width of 2 (default for tag numbers between 64 and 1023), bit 8 of the tag number got accidentally cleared.
2019-12-28Add missing #define for submsg callbacks, add regression test (#472)Petteri Aimonen
2019-12-20Setting version to 0.4.1-devPetteri Aimonen
2019-12-20Publishing nanopb-0.4.0nanopb-0.4.00.4.0Petteri Aimonen
2019-12-18Add test case for #407Petteri Aimonen
2019-12-18Store field descriptor constants in flash on AVR (#464)Petteri Aimonen
2019-12-18Improve callback handling inside oneofs. (#175)Petteri Aimonen
Removed PB_OLD_CALLBACK_STYLE. Added generator option submsg_callback to have a message-level callback for setting up callbacks inside oneofs. Added example/testcase about using callbacks with oneofs.
2019-12-18Windows and AVR build fixesPetteri Aimonen
2019-12-17Introduce new compile time flag: PB_VALIDATE_UTF8Pavol Rusnak
Check whether incoming strings are valid UTF-8 sequences. Slows down the string processing slightly and slightly increases code size.
2019-12-16Add PB_CONVERT_DOUBLE_FLOAT setting to convert doubles on AVR.Petteri Aimonen
This is easier to use than the old method of separate conversion functions. More importantly, it should allow running the same tests on AVR target.
2019-12-15Make submsg_info go into flashPetteri Aimonen
2019-11-09Make constants in header files unsigned, to prevent warnings when used in ↵Torfinn Berset
binary bitwise expressions.
2019-10-02Fix undefined behavior with bool fields (#434)Petteri Aimonen
Previously nanopb didn't enforce that decoded bool fields had valid true/false values. This could lead to undefined behavior in user code. This has potential security implications when 1) message contains bool field (has_ fields are safe) and 2) user code uses ternary operator dependent on the field value, such as: int value = msg.my_bool ? 1234 : 0 and 3) the value returned from ternary operator affects a memory access, such as: data_array[value] = 9999
2019-08-27Introduce new compile time flag: PB_ENCODE_ARRAYS_UNPACKEDPavol Rusnak
Don't encode scalar arrays as packed. This is only to be used when the decoder on the receiving side cannot process packed scalar arrays. Such example is older protobuf.js.
2019-05-20fix error when __STDC_VERSION__ is not definedFay
2019-03-22Add missing uint32_t casts (#385)Petteri Aimonen
2019-03-03Add C++ message descriptors helperVitali Lovich
Zero-overhead. Allows creating simpler general nanopb C++ wrappers by examining variable type and not needing macro magic.
2019-01-30Build fixes for Microsoft VC++Petteri Aimonen