diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2012-06-30 18:10:08 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2012-06-30 18:10:08 +0300 |
commit | 95eb4a549981dc556dd30c5d76a6b437bb5ed06d (patch) | |
tree | c0344bb22676b1167d66c41bcde9bb228c1a16f3 /pb.h | |
parent | 7bcf7ef5796c66125a2a4df1317b55a27adedd89 (diff) |
Improve the detection of missing required fields.
Now the limit of tracked fields is configurable at compile-time using
PB_MAX_REQUIRED_FIELDS. Added related test and updated documentation.
Fixes issue #18.
Diffstat (limited to 'pb.h')
-rw-r--r-- | pb.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -22,6 +22,12 @@ #define UNUSED(x) (void)(x) #endif +/* Number of required fields to keep track of + * (change here or on compiler command line). */ +#ifndef PB_MAX_REQUIRED_FIELDS +#define PB_MAX_REQUIRED_FIELDS 64 +#endif + /* List of possible field types. These are used in the autogenerated code. * Least-significant 4 bits tell the scalar type * Most-significant 4 bits specify repeated/required/packed etc. |