MCPcopy Create free account
hub / github.com/Santroller/Santroller / encode_callback_field

Function encode_callback_field

lib/nanopb/pb_encode.c:407–415  ·  view source on GitHub ↗

Encode a field with callback semantics. This means that a user function is * called to provide and encode the actual data. */

Source from the content-addressed store, hash-verified

405/* Encode a field with callback semantics. This means that a user function is
406 * called to provide and encode the actual data. */
407static bool checkreturn encode_callback_field(pb_ostream_t *stream, const pb_field_iter_t *field)
408{
409 if (field->descriptor->field_callback != NULL)
410 {
411 if (!field->descriptor->field_callback(NULL, stream, field))
412 PB_RETURN_ERROR(stream, "callback error");
413 }
414 return true;
415}
416
417/* Encode a single field of any callback, pointer or static type. */
418static bool checkreturn encode_field(pb_ostream_t *stream, pb_field_iter_t *field)

Callers 1

encode_fieldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected