opensourcerouting / c-capnproto

C library/compiler for the Cap'n Proto serialization/RPC protocol
MIT License
118 stars 40 forks source link

Make enums generate uint16_t instead of enums for binary compatibility. #39

Closed detly closed 3 years ago

detly commented 3 years ago

This should fix #38. However, I haven't yet had time to write a test and see it fail/pass with my patch here, or test it on a more complex system.

This will also break code that uses enum Whatever for Cap'n Proto enums, since this typedefs the enums as uint16_t. The fix is to simply drop the enum in calling code.

detly commented 3 years ago

This is the wrong approach. I have found a much simpler fix for this problem.