Support dynamic allocation for string, bytes and message fields.
This is turned on by passing -p to nanopb_generator.py or setting the (nanopb).pointer option for a .proto field. git-svn-id: https://svn.kapsi.fi/jpa/nanopb-dev@1081 e3a754e5-d11d-0410-8d38-ebb782a927b9
This commit is contained in:
committed by
Petteri Aimonen
parent
8e5337e9ef
commit
c66c6b43c4
@@ -68,4 +68,10 @@ bool pb_dec_bytes(pb_istream_t *stream, const pb_field_t *field, void *dest);
|
||||
bool pb_dec_string(pb_istream_t *stream, const pb_field_t *field, void *dest);
|
||||
bool pb_dec_submessage(pb_istream_t *stream, const pb_field_t *field, void *dest);
|
||||
|
||||
/* Release memory and clear pointers for any unused elements of
|
||||
* dest_struct. This function is only compiled when MALLOC_HEADER is
|
||||
* defined for pb_decode.c.
|
||||
*/
|
||||
bool pb_clean(const pb_message_t *msg, void *dest_struct);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user