/nanopb-3.4.0/tests/alltypes_callback/ |
D | encode_alltypes_callback.c | 13 static bool write_varint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_varint() argument 16 pb_encode_varint(stream, (intptr_t)*arg); in write_varint() 19 static bool write_svarint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_svarint() argument 22 pb_encode_svarint(stream, (intptr_t)*arg); in write_svarint() 25 static bool write_fixed32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_fixed32() argument 28 pb_encode_fixed32(stream, *arg); in write_fixed32() 31 static bool write_fixed64(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_fixed64() argument 34 pb_encode_fixed64(stream, *arg); in write_fixed64() 37 static bool write_double(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_double() argument 42 pb_encode_float_as_double(stream, *(float*)*arg); in write_double() [all …]
|
D | decode_alltypes_callback.c | 18 static bool read_varint(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_varint() argument 24 TEST((int64_t)value == (intptr_t)*arg); in read_varint() 28 static bool read_svarint(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_svarint() argument 34 TEST(value == (intptr_t)*arg); in read_svarint() 38 static bool read_fixed32(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_fixed32() argument 44 TEST(value == *(uint32_t*)*arg); in read_fixed32() 48 static bool read_fixed64(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_fixed64() argument 54 TEST(value == *(uint64_t*)*arg); in read_fixed64() 58 static bool read_double(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_double() argument 67 TEST(memcmp(&value, *arg, sizeof(float)) == 0); in read_double() [all …]
|
/nanopb-3.4.0/tests/alltypes_proto3_callback/ |
D | decode_alltypes_callback.c | 18 static bool read_varint(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_varint() argument 24 TEST((int64_t)value == (intptr_t)*arg); in read_varint() 28 static bool read_svarint(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_svarint() argument 34 TEST(value == (intptr_t)*arg); in read_svarint() 38 static bool read_fixed32(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_fixed32() argument 44 TEST(value == *(uint32_t*)*arg); in read_fixed32() 48 static bool read_fixed64(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_fixed64() argument 54 TEST(value == *(uint64_t*)*arg); in read_fixed64() 58 static bool read_double(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_double() argument 67 TEST(memcmp(&value, *arg, sizeof(float)) == 0); in read_double() [all …]
|
D | encode_alltypes_callback.c | 13 static bool write_varint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_varint() argument 16 pb_encode_varint(stream, (intptr_t)*arg); in write_varint() 19 static bool write_svarint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_svarint() argument 22 pb_encode_svarint(stream, (intptr_t)*arg); in write_svarint() 25 static bool write_fixed32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_fixed32() argument 28 pb_encode_fixed32(stream, *arg); in write_fixed32() 31 static bool write_fixed64(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_fixed64() argument 34 pb_encode_fixed64(stream, *arg); in write_fixed64() 37 static bool write_double(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_double() argument 42 pb_encode_float_as_double(stream, *(float*)*arg); in write_double() [all …]
|
/nanopb-3.4.0/tests/callbacks/ |
D | decode_callbacks.c | 10 bool print_string(pb_istream_t *stream, const pb_field_t *field, void **arg) in print_string() argument 24 printf((char*)*arg, buffer); in print_string() 28 bool print_int32(pb_istream_t *stream, const pb_field_t *field, void **arg) in print_int32() argument 34 printf((char*)*arg, (long)value); in print_int32() 38 bool print_fixed32(pb_istream_t *stream, const pb_field_t *field, void **arg) in print_fixed32() argument 44 printf((char*)*arg, (long)value); in print_fixed32() 48 bool print_fixed64(pb_istream_t *stream, const pb_field_t *field, void **arg) in print_fixed64() argument 54 printf((char*)*arg, (long)value); in print_fixed64() 74 testmessage.submsg.stringvalue.arg = "submsg {\n stringvalue: \"%s\"\n"; in main() 76 testmessage.submsg.int32value.arg = " int32value: %ld\n"; in main() [all …]
|
D | encode_callbacks.c | 9 bool encode_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_string() argument 19 bool encode_int32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_int32() argument 27 bool encode_fixed32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_fixed32() argument 37 bool encode_fixed64(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_fixed64() argument 47 bool encode_repeatedstring(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_repeatedstring() argument
|
/nanopb-3.4.0/tests/cyclic_messages/ |
D | encode_cyclic_callback.c | 33 static bool encode_tree(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_tree() argument 36 char *p = (char*)*arg; in encode_tree() 43 tree.left.arg = p; in encode_tree() 47 tree.right.arg = p; in encode_tree() 61 static bool encode_dictionary(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_dictionary() argument 64 char *p = (char*)*arg; in encode_dictionary() 85 pair.treeValue.arg = p; in encode_dictionary() 101 pair.dictValue.dictItem.arg = p; in encode_dictionary() 136 dict.dictItem.arg = argv[1]; in main()
|
/nanopb-3.4.0/tests/oneof_callback/ |
D | decode_oneof.c | 45 bool print_int32(pb_istream_t *stream, const pb_field_t *field, void **arg) in print_int32() argument 51 printf((char*)*arg, (int)value); in print_int32() 55 bool print_string(pb_istream_t *stream, const pb_field_t *field, void **arg) in print_string() argument 71 printf((char*)*arg, buffer); in print_string() 81 bool msg_callback(pb_istream_t *stream, const pb_field_t *field, void **arg) in msg_callback() argument 95 msg->array.arg = " array: %d\n"; in msg_callback() 102 msg->strvalue.arg = " strvalue: \"%s\"\n"; in msg_callback()
|
D | encode_oneof.c | 35 bool encode_int32_array(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_int32_array() argument 49 bool encode_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_string() argument
|
/nanopb-3.4.0/tests/regression/issue_249/ |
D | test.c | 6 static bool write_array(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_array() argument 20 static bool read_array(pb_istream_t *stream, const pb_field_t *field, void **arg) in read_array() argument 23 int *sum = *arg; in read_array() 52 msg.submsg.foo.arg = ∑ in main()
|
/nanopb-3.4.0/tests/namingstyle/ |
D | test_naming_style_c.c | 24 message.my_enum4.arg = NULL; in main() 28 message.optional_string.arg = NULL; in main() 41 message.sub_message2.arg = NULL; in main()
|
/nanopb-3.4.0/tests/fuzztest/ |
D | fuzztest.c | 144 static bool field_callback(pb_istream_t *stream, const pb_field_t *field, void **arg) in field_callback() argument 148 assert(*arg == &g_sentinel); in field_callback() 152 static bool submsg_callback(pb_istream_t *stream, const pb_field_t *field, void **arg) in submsg_callback() argument 156 assert(*arg == &g_sentinel); in submsg_callback() 172 msg->rep_int32.arg = &g_sentinel; in do_callback_decode() 174 msg->rep_string.arg = &g_sentinel; in do_callback_decode() 176 msg->rep_farray.arg = &g_sentinel; in do_callback_decode() 178 msg->req_limits.int64_min.arg = &g_sentinel; in do_callback_decode() 180 msg->cb_oneof.arg = &g_sentinel; in do_callback_decode()
|
/nanopb-3.4.0/tests/regression/issue_342/ |
D | test_extensions.c | 9 static bool write_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in write_string() argument
|
/nanopb-3.4.0/tests/regression/issue_544/ |
D | submsg_callback.c | 6 bool msg_callback(pb_istream_t *stream, const pb_field_t *field, void **arg) in msg_callback() argument
|
/nanopb-3.4.0/tests/encode_unittests/ |
D | encode_unittests.c | 21 bool fieldcallback(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in fieldcallback() argument 29 bool crazyfieldcallback(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in crazyfieldcallback() argument 32 uint32_t *state = (uint32_t*)arg; in crazyfieldcallback() 386 msg.submsg.data.arg = &state; in main() 388 msg2.submsg.submsg.data.arg = &state; in main()
|
/nanopb-3.4.0/ |
D | pb_common.c | 168 const pb_msgdesc_t *msg = (const pb_msgdesc_t*)extension->type->arg; in pb_field_iter_begin_extension() 310 return pCallback->funcs.decode(istream, field, &pCallback->arg); in pb_default_field_callback() 315 return pCallback->funcs.encode(ostream, field, &pCallback->arg); in pb_default_field_callback()
|
D | pb.h | 401 bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); 402 bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); 406 void *arg; member 447 const void *arg; member
|
D | pb_encode.c | 940 if (!callback->funcs.encode(stream, field, &callback->arg)) in pb_enc_submessage()
|
D | pb_decode.c | 1607 status = callback->funcs.decode(&substream, field, &callback->arg); in pb_dec_submessage()
|
/nanopb-3.4.0/tests/mem_release/ |
D | mem_release.c | 205 static bool dummy_decode_cb(pb_istream_t *stream, const pb_field_t *field, void **arg) in dummy_decode_cb() argument 231 msg.subs.arg = NULL; in test_Garbage()
|
/nanopb-3.4.0/docs/ |
D | concepts.md | 244 function pointer and a `void` pointer called `arg` you can use for 246 will be skipped. A pointer to the `arg` is passed to the function, so 259 bool (*encode)(pb_ostream_t *stream, const pb_field_iter_t *field, void * const *arg); 265 | `arg` | Pointer to the `arg` field in the `pb_callback_t` structure. | 285 bool write_string(pb_ostream_t *stream, const pb_field_iter_t *field, void * const *arg) 296 bool (*decode)(pb_istream_t *stream, const pb_field_iter_t *field, void **arg); 302 | `arg` | Pointer to the `arg` field in the `pb_callback_t` structure. | 316 bool read_ints(pb_istream_t *stream, const pb_field_iter_t *field, void **arg)
|
D | reference.md | 335 bool (*decode)(pb_istream_t *stream, const pb_field_iter_t *field, void **arg); 336 bool (*encode)(pb_ostream_t *stream, const pb_field_iter_t *field, void * const *arg); 339 void *arg; 342 A pointer to the *arg* is passed to the callback when calling. It can be 344 this is a double pointer. If you set `field.arg` to point to 347 myfunction(*arg); /* Gives pointer to data as argument */ 348 myfunction(*(data_t*)*arg); /* Gives value of data as argument */ 349 *arg = newdata; /* Alters value of field.arg in structure */ 379 const void *arg; 384 assume that `arg` points to a [pb_field_iter_t](#pb_field_iter_t)
|
D | migration.md | 581 - Change the callback function body to use **arg` instead of `arg`.
|
/nanopb-3.4.0/tests/decode_unittests/ |
D | decode_unittests.c | 24 bool callback_check(pb_istream_t *stream, const pb_field_t *field, void **arg) in callback_check() argument 28 pb_bytes_array_t *ref = (pb_bytes_array_t*) *arg; in callback_check() 355 dest.data.arg = &ref; in main()
|
/nanopb-3.4.0/spm_headers/nanopb/ |
D | pb.h | 401 bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); 402 bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); 406 void *arg; member 447 const void *arg; member
|