diff options
author | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-22 18:57:23 +0000 |
---|---|---|
committer | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-22 18:57:23 +0000 |
commit | 5a9f85b87615078868d3b394370a30b550186cce (patch) | |
tree | fd2b911a5708f341fcf2b839d05e8e5653bd99ab /docs/reference.rst | |
parent | 494fbd91e4e5574a4cf8dbe69b3f80a08e97e85b (diff) |
unittests, change to PB_LTYPE_BYTES data size
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@959 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'docs/reference.rst')
-rw-r--r-- | docs/reference.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/reference.rst b/docs/reference.rst index 2812958f..2fc3d481 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -61,7 +61,7 @@ Describes a single structure field with memory position in relation to others. T :type: LTYPE and HTYPE of the field. :data_offset: Offset of field data, relative to the end of the previous field. :size_offset: Offset of *bool* flag for optional fields or *size_t* count for arrays, relative to field data. -:data_size: Size of a single data entry, in bytes. +:data_size: Size of a single data entry, in bytes. For PB_LTYPE_BYTES, the size of the byte array inside the containing structure. :array_size: Maximum number of entries in an array, if it is an array type. :ptr: Pointer to default value for optional fields, or to submessage description for PB_LTYPE_SUBMESSAGE. @@ -339,7 +339,7 @@ Read and decode all fields of a structure. Reads until EOF on input stream. :: :dest_struct: Pointer to structure where data will be stored. :returns: True on success, false on IO error, on detectable errors in field description, if a field encoder returns false or if a required field is missing. -In Protocol Buffers binary format, EOF is only allowed between fields. If it happens anywhere else, pb_decode will return *false*. +In Protocol Buffers binary format, EOF is only allowed between fields. If it happens anywhere else, pb_decode will return *false*. If pb_decode returns false, you cannot trust any of the data in the structure. In addition to EOF, the pb_decode implementation supports terminating a message with a 0 byte. This is compatible with the official Protocol Buffers because 0 is never a valid field tag. |