unittests (some)
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@949 e3a754e5-d11d-0410-8d38-ebb782a927b9
This commit is contained in:
9
pb.h
9
pb.h
@@ -112,8 +112,6 @@ struct _pb_field_t {
|
||||
const void *ptr;
|
||||
} pb_packed;
|
||||
|
||||
#define PB_LAST_FIELD {0,0,0,0}
|
||||
|
||||
/* This structure is used for 'bytes' arrays.
|
||||
* It has the number of bytes in the beginning, and after that an array. */
|
||||
#define PB_BYTES_ARRAY(buffersize) \
|
||||
@@ -152,4 +150,11 @@ struct _pb_callback_t {
|
||||
void *arg;
|
||||
};
|
||||
|
||||
/* These macros are used to declare pb_field_t's in the constant array. */
|
||||
#define pb_membersize(st, m) (sizeof ((st*)0)->m)
|
||||
#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0]))
|
||||
#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2))
|
||||
#define PB_LAST_FIELD {0,0,0,0}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user