Interesting C header translation problem
Petteri Aimonen via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Aug 8 03:11:56 PDT 2014
Hi,
> Honestly, I don't know. I would go stab the original API
> designers in the face and tell them to clean up their mess.
I'm sorry to reply to a 2-year-old topic, but as the original API
designer, I simply couldn't resist :)
Please do not stab me in the face.
The nanopb API was never designed to be wrapped, or to be used as
a dynamic library. The situation in the targeted embedded systems
is that everything is compiled by the same compiler, under same
settings, to a single binary.
The packed attribute on enums in GCC makes them use the smallest
integer type, uint8_t in this case. All this has been replaced
with simpler typedef and #defines nowadays though.
As for what was being tried to do in this thread, I would think a
native protobuf implementation for D would be much saner than
trying to wrap a C implementation.
--
Petteri
More information about the Digitalmars-d-learn
mailing list