diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2020-01-16 12:08:04 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2020-01-16 12:08:04 +0300 |
commit | a6ae0741a4811633118b1b8bb6f987d4b206df0c (patch) | |
tree | 396c4bab4a7ff5282d5c5618806fdb9925abbe35 /pb_common.h | |
parent | 776244f065287f07e269bc446b5972e137537ced (diff) |
Move pb_const_cast to pb_common.c
Diffstat (limited to 'pb_common.h')
-rw-r--r-- | pb_common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pb_common.h b/pb_common.h index 4db04d2..47fa2c9 100644 --- a/pb_common.h +++ b/pb_common.h @@ -18,6 +18,12 @@ bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_msgdesc_t *desc, void * /* Get a field iterator for extension field. */ bool pb_field_iter_begin_extension(pb_field_iter_t *iter, pb_extension_t *extension); +/* Same as pb_field_iter_begin(), but for const message pointer. + * Note that the pointers in pb_field_iter_t will be non-const but shouldn't + * be written to when using these functions. */ +bool pb_field_iter_begin_const(pb_field_iter_t *iter, const pb_msgdesc_t *desc, const void *message); +bool pb_field_iter_begin_extension_const(pb_field_iter_t *iter, const pb_extension_t *extension); + /* Advance the iterator to the next field. * Returns false when the iterator wraps back to the first field. */ bool pb_field_iter_next(pb_field_iter_t *iter); |