Closed GoogleCodeExporter closed 9 years ago
Thanks for noticing this before release!
Fix has been committed.
However I'll leave this bug open to remind me to change enum pb_type_t to
uint8_t typedef in 0.2. This has been suggested a thousand times for various
reasons, and the only reason to keep it this way has been compatibility and
"enum looks prettier to me". But I guess the reasons are overwhelming:
1) Some compilers complain about bitwise operations on enums.
2) The enum may be 2 or 4 bytes on compilers other than GCC.
3) gdb (and maybe other debuggers too) decode the values a bit funnily. For
example PB_LTYPE_VARINT == PB_HTYPE_REQUIRED.
Original comment by Petteri.Aimonen
on 7 Feb 2013 at 3:27
The switch to #defines has been done by this commit on 0.2:
https://code.google.com/p/nanopb/source/detail?r=ec4a7a0ccef07266cdd3e309e1d3b72
33413142c&name=dev-0.2
Original comment by Petteri.Aimonen
on 16 Feb 2013 at 10:15
Fix released in nanopb-0.2.0.
Original comment by Petteri.Aimonen
on 2 Mar 2013 at 2:39
Original issue reported on code.google.com by
david.ho...@googlemail.com
on 7 Feb 2013 at 12:03