Implement extension support for the encoder

This commit is contained in:
Petteri Aimonen
2013-07-17 19:23:19 +03:00
parent 7c5e184c26
commit ebddda9b5c
2 changed files with 74 additions and 22 deletions

2
pb.h
View File

@@ -298,7 +298,7 @@ struct _pb_extension_type_t {
* If you run into an error, return false.
* Set to NULL for default handler.
*/
bool (*encode)(pb_ostream_t *stream, pb_extension_t *extension);
bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension);
/* Free field for use by the callback. */
const void *arg;