summaryrefslogtreecommitdiffstats
path: root/docs/concepts.rst
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@npb.mail.kapsi.fi>2011-09-12 18:53:33 +0000
committerPetteri Aimonen <jpa@npb.mail.kapsi.fi>2011-09-12 18:53:33 +0000
commitd4abb63c052dc9d4c23ce72e498b4c7483f3b7cb (patch)
tree340d5abed388ef4abda42f6e4208948abfb9efb9 /docs/concepts.rst
parent35814517ad9da0edad3905269ea41facfb120f3c (diff)
Tests for callback fields
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@974 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'docs/concepts.rst')
-rw-r--r--docs/concepts.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/concepts.rst b/docs/concepts.rst
index e6076401..c4e5476e 100644
--- a/docs/concepts.rst
+++ b/docs/concepts.rst
@@ -201,7 +201,7 @@ Decoding callbacks
bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void *arg);
-When decoding, the callback receives a length-limited substring that reads the contents of a single field. The field tag has already been read.
+When decoding, the callback receives a length-limited substring that reads the contents of a single field. The field tag has already been read. For *string* and *bytes*, the length value has already been parsed, and is available at *stream->bytes_left*.
The callback will be called multiple times for repeated fields. For packed fields, you can either read multiple values until the stream ends, or leave it to `pb_decode`_ to call your function over and over until all values have been read.