SIGN IN SIGN UP

Protocol Buffers - Google's data interchange format

0 0 35 C++

Changed function array so that disabled functions are not populated.

We now fill disabled table slots with the "generic" parsing function at
compile time instead of runtime.  This gives us more fiexibility to
simply not have the functions exist when they are disabled.

This required moving the logic for whether a function is disabled to
macros instead of inline functions, because we need it to be a
constant expression when initializing the function array.

To demonstrate that this worked, we remove a few of the fixed field parsing functions, and observe that the tests still compile and link successfully.

PiperOrigin-RevId: 763878986
J
Joshua Haberman committed
2c4c64603a9a96cfb666a776f6fccd810eb0eea9
Parent: 3fda591
Committed by Copybara-Service <copybara-worker@google.com> on 5/27/2025, 6:34:26 PM