X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=docs%2Freference.rst;h=371c155a027e8ef559a3a52afb65cfdbd7288f60;hb=068de05c51b7b46e33ef87b8d78c9dda6704abc8;hp=ec9aec5d56b49bd53dd2b8bd9e3167116e2688fd;hpb=1463e687e36c8dd404d33c6ef1cba61b574adc1e;p=apps%2Fagl-service-can-low-level.git diff --git a/docs/reference.rst b/docs/reference.rst index ec9aec5d..371c155a 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -322,6 +322,16 @@ In addition to EOF, the pb_decode implementation supports terminating a message For optional fields, this function applies the default value and sets *has_* to false if the field is not present. +pb_decode_noinit +---------------- +Same as `pb_decode`_, except does not apply the default values to fields. :: + + bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +(parameters are the same as for `pb_decode`_.) + +The destination structure should be filled with zeros before calling this function. Doing a *memset* manually can be slightly faster than using `pb_decode`_ if you don't need any default values. + pb_skip_varint -------------- Skip a varint_ encoded integer without decoding it. ::