diff options
author | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-11 19:22:36 +0000 |
---|---|---|
committer | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-11 19:22:36 +0000 |
commit | 6dfba365b00175eae7e8b83aaf5d29ce190fd9eb (patch) | |
tree | f7908f61cb8606a281aa709d187f3b8329385821 /pb_encode.h | |
parent | 09f92bafa59460ea4597c557e469e982386c9e3b (diff) |
Documenting and improving stream behaviour
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@954 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'pb_encode.h')
-rw-r--r-- | pb_encode.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pb_encode.h b/pb_encode.h index 17ba5b9a..b341602d 100644 --- a/pb_encode.h +++ b/pb_encode.h @@ -17,14 +17,14 @@ * max_size is not checked. * * Rules for callback: - * 1) Return false on IO errors. This will cause decoding to abort. + * 1) Return false on IO errors. This will cause encoding to abort. * * 2) You can use state to store your own data (e.g. buffer pointer). * * 3) pb_write will update bytes_written after your callback runs. * - * 4) Your callback will be always used with the same pb_ostream_t. - * There are no substreams when encoding. + * 4) Substreams will modify max_size and bytes_written. Don't use them to + * calculate any pointers. */ struct _pb_ostream_t { |