diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2015-11-14 22:23:48 +0200 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2015-11-14 22:23:48 +0200 |
commit | c1aa8aa980daea732c4683c2593d130d6bee7a79 (patch) | |
tree | df8ea9bb1f8fb765fc8a2ec1428447990c8a0808 /pb.h | |
parent | 9a8cc59703b227ff418cc55b4dc24f63eda64b62 (diff) |
Add testcase for anonymous unions + few fixes.
Fixes compilation error with anonymous unions when
it is not the last field in message. Also fixes
extraneous newlines in header file. Cleanup the
pb.h extraneous use of ##.
Diffstat (limited to 'pb.h')
-rw-r--r-- | pb.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -518,7 +518,7 @@ struct pb_extension_s { pb_membersize(st, u.m[0]), 0, ptr} #define PB_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ - PB_ ## ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_ONEOF_ ## allocation(union_name, tag, message, field, \ PB_DATAOFFSET_ ## placement(message, union_name.field, prevfield), \ PB_LTYPE_MAP_ ## type, ptr) @@ -533,7 +533,7 @@ struct pb_extension_s { pb_membersize(st, m[0]), 0, ptr} #define PB_ANONYMOUS_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ - PB_ ## ANONYMOUS_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_ANONYMOUS_ONEOF_ ## allocation(union_name, tag, message, field, \ PB_DATAOFFSET_ ## placement(message, field, prevfield), \ PB_LTYPE_MAP_ ## type, ptr) |