summaryrefslogtreecommitdiffstats
path: root/tests/test_decode_callbacks.c
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-08-24 20:23:25 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-08-24 20:23:25 +0300
commit2941e90e041b0d7872a4ea458e77dcc787ca6ff2 (patch)
treeca2f8b83d059e4ac5569413498aa27230ba2083c /tests/test_decode_callbacks.c
parentdc2da0edc568b29361479fb7405c96b1a13442cf (diff)
Reorganize the field decoder interface.
This makes the field decoding functions more intuitive to use. The old interface is still present if you specify NANOPB_INTERNALS. Update issue 2 Status: FixedInGit
Diffstat (limited to 'tests/test_decode_callbacks.c')
-rw-r--r--tests/test_decode_callbacks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_decode_callbacks.c b/tests/test_decode_callbacks.c
index 714b7bb2..95824d1a 100644
--- a/tests/test_decode_callbacks.c
+++ b/tests/test_decode_callbacks.c
@@ -37,7 +37,7 @@ bool print_int32(pb_istream_t *stream, const pb_field_t *field, void *arg)
bool print_fixed32(pb_istream_t *stream, const pb_field_t *field, void *arg)
{
uint32_t value;
- if (!pb_dec_fixed32(stream, NULL, &value))
+ if (!pb_decode_fixed32(stream, &value))
return false;
printf((char*)arg, (long)value);
@@ -47,7 +47,7 @@ bool print_fixed32(pb_istream_t *stream, const pb_field_t *field, void *arg)
bool print_fixed64(pb_istream_t *stream, const pb_field_t *field, void *arg)
{
uint64_t value;
- if (!pb_dec_fixed64(stream, NULL, &value))
+ if (!pb_decode_fixed64(stream, &value))
return false;
printf((char*)arg, (long long)value);