plugins: (statically) assert choice list value/label array lengths match
(Split from MR !319 (merged))
This adds a static (built-time) assertion that the length of given choice list value and label arrays are of equal length.
This happens to impose a new constraint to the two macros this is applied to - you now cannot use extern
variables for the arrays. This is because of the language limitation that sizeof()
cannot be used with them.
One in-tree module needed an extern
variable fix as a result of this constraint, as done in the first commit.
The value of this check must be weighted against this constraint - do we care about supporting modules being able to use extern
arrays for these macros; does it cause a problem for anything.