summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Linhart <chris@demorecorder.com>2014-08-19 15:57:34 +0200
committerPeter Harris <pharris@opentext.com>2014-08-20 11:59:04 -0400
commit355d4d6ab9f5c12c2ee4a91e8cf6eb4a2854d73c (patch)
tree76740fb95aab1c94660d2f94effe892e4f270dd4 /configure.ac
parent966fba6ba4838949d0727dfa45eeb9392d1f85d9 (diff)
support switch case in the generator
The implementation is rather simple: When a <case> is used instead of a <bitcase> then operator "==" is used instead of "&" in the if-condition. So it creates a series of "if" statements (instead of a switch-case statement in C ) In practice this does not matter because a good optimizing compiler will create the same code as for a switch-case. With this simple implementation we get additional flexibility in the following forms: * a case value may appear in multiple case branches. for example: case C1 will be selected by values 1, 4, or 5 case C2 will be selected by values 3, 4, or 7 * mixing of bitcase and case is possible (this will usually make no sense but there may be protocol specs where this is needed) details of the impl: * replaced "is_bitcase" with "is_case_or_bitcase" in all places so that cases are treated like bitcases. * In function "_c_serialize_helper_switch": write operator "==" instead of operator "&" if it is a case.
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions