aboutsummaryrefslogtreecommitdiff
path: root/pb.h
diff options
context:
space:
mode:
Diffstat (limited to 'pb.h')
-rw-r--r--pb.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/pb.h b/pb.h
index 52d24de..41c8cdc 100644
--- a/pb.h
+++ b/pb.h
@@ -46,7 +46,7 @@
/* Version of the nanopb library. Just in case you want to check it in
* your own program. */
-#define NANOPB_VERSION nanopb-0.3.9.1
+#define NANOPB_VERSION nanopb-0.3.9.2
/* Include all the system headers needed by nanopb. You will need the
* definitions of the following:
@@ -122,11 +122,6 @@
#define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER)
#define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##LINE##COUNTER
#endif
-#ifndef STATIC_ASSERT
-#define STATIC_ASSERT PB_STATIC_ASSERT
-#define STATIC_ASSERT_MSG PB_STATIC_ASSERT_MSG
-#define STATIC_ASSERT_MSG_ PB_STATIC_ASSERT_MSG_
-#endif
#else
#define PB_STATIC_ASSERT(COND,MSG)
#endif
@@ -194,7 +189,7 @@ typedef uint_least8_t pb_type_t;
#define PB_HTYPE_MASK 0x30
/**** Field allocation types ****/
-
+
#define PB_ATYPE_STATIC 0x00
#define PB_ATYPE_POINTER 0x80
#define PB_ATYPE_CALLBACK 0x40
@@ -242,7 +237,7 @@ struct pb_field_s {
pb_ssize_t size_offset; /* Offset of array size or has-boolean, relative to data */
pb_size_t data_size; /* Data size in bytes for a single item */
pb_size_t array_size; /* Maximum number of entries in array */
-
+
/* Field definitions for submessage
* OR default value for all other non-array, non-callback types
* If null, then field will zeroed. */
@@ -308,8 +303,8 @@ struct pb_callback_s {
bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg);
bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg);
} funcs;
-#endif
-
+#endif
+
/* Free arg for use by callback */
void *arg;
};
@@ -339,7 +334,7 @@ struct pb_extension_type_s {
*/
bool (*decode)(pb_istream_t *stream, pb_extension_t *extension,
uint32_t tag, pb_wire_type_t wire_type);
-
+
/* Called once after all regular fields have been encoded.
* If you have something to write, do so and return true.
* If you do not have anything to write, just return true.
@@ -347,7 +342,7 @@ struct pb_extension_type_s {
* Set to NULL for default handler.
*/
bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension);
-
+
/* Free field for use by the callback. */
const void *arg;
};
@@ -356,11 +351,11 @@ struct pb_extension_s {
/* Type describing the extension field. Usually you'll initialize
* this to a pointer to the automatically generated structure. */
const pb_extension_type_t *type;
-
+
/* Destination for the decoded data. This must match the datatype
* of the extension field. */
void *dest;
-
+
/* Pointer to the next extension handler, or NULL.
* If this extension does not match a field, the next handler is
* automatically called. */
@@ -467,7 +462,7 @@ struct pb_extension_s {
#define PB_SINGULAR_CALLBACK(tag, st, m, fd, ltype, ptr) \
{tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \
fd, 0, pb_membersize(st, m), 0, ptr}
-
+
#define PB_REPEATED_CALLBACK(tag, st, m, fd, ltype, ptr) \
{tag, PB_ATYPE_CALLBACK | PB_HTYPE_REPEATED | ltype, \
fd, 0, pb_membersize(st, m), 0, ptr}