Closed GoogleCodeExporter closed 9 years ago
Could you perhaps use pb_membersize(Foo, bytes) instead? That avoids
generating a bunch of messy #defines.
Also, if you already have a variable of type Foo declared, you can use just
sizeof(Foo.bytes).
Original comment by Petteri.Aimonen
on 8 Feb 2014 at 9:43
[deleted comment]
Ah, OK, got it. I guess your suggestion solves this issue. For max_count you
would use pb_arraysize right?
Original comment by rusn...@gmail.com
on 8 Feb 2014 at 9:50
Indeed. Those are the same ones as nanopb uses internally.
Original comment by Petteri.Aimonen
on 8 Feb 2014 at 9:51
Feel free to close then. Using pb_membersize/pb_arraysize makes sense and has
even better readability then introducing new macros.
Original comment by rusn...@gmail.com
on 8 Feb 2014 at 9:53
Original issue reported on code.google.com by
rusn...@gmail.com
on 8 Feb 2014 at 9:39