summaryrefslogtreecommitdiffstats
path: root/docs/reference.rst
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-06-30 18:10:08 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-06-30 18:10:08 +0300
commit95eb4a549981dc556dd30c5d76a6b437bb5ed06d (patch)
treec0344bb22676b1167d66c41bcde9bb228c1a16f3 /docs/reference.rst
parent7bcf7ef5796c66125a2a4df1317b55a27adedd89 (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 'docs/reference.rst')
-rw-r--r--docs/reference.rst13
1 files changed, 6 insertions, 7 deletions
diff --git a/docs/reference.rst b/docs/reference.rst
index f4957804..81251fe6 100644
--- a/docs/reference.rst
+++ b/docs/reference.rst
@@ -10,11 +10,12 @@ Compilation options
===================
The following options can be specified using -D switch given to the C compiler:
-================== ==============================================================================================
-__BIG_ENDIAN__ Set this if your platform stores integers and floats in big-endian format.
- Mixed-endian systems (different layout for ints and floats) are currently not supported.
-NANOPB_INTERNALS Set this to expose the field encoder functions that are hidden since nanopb-0.1.3.
-================== ==============================================================================================
+============================ ==============================================================================================
+__BIG_ENDIAN__ Set this if your platform stores integers and floats in big-endian format.
+ Mixed-endian systems (different layout for ints and floats) are currently not supported.
+NANOPB_INTERNALS Set this to expose the field encoder functions that are hidden since nanopb-0.1.3.
+PB_MAX_REQUIRED_FIELDS Maximum number of required fields to check for presence. Default value is 64.
+============================ ==============================================================================================
pb.h
====
@@ -310,8 +311,6 @@ In addition to EOF, the pb_decode implementation supports terminating a message
For optional fields, this function applies the default value and sets *has_<field>* to false if the field is not present.
-Because of memory concerns, the detection of missing required fields is not perfect if the structure contains more than 32 fields.
-
pb_decode_varint
----------------
Read and decode a varint_ encoded integer. ::