11 BaseMessage msg = BaseMessage_init_zero;
23 if (!
pb_decode(&stream, BaseMessage_fields, &msg))
29 assert(msg.start == 1234);
30 assert(msg.end == 5678);
33 if (
strcmp(msg.details.type_url,
"type.googleapis.com/google.protobuf.Duration") == 0)
35 google_protobuf_Duration duration = google_protobuf_Duration_init_zero;
37 status =
pb_decode(&stream, google_protobuf_Duration_fields, &duration);
39 assert(duration.seconds == 99999);
40 assert(duration.nanos == 100);
45 fprintf(
stderr,
"Unknown Any type\n");
size_t fread(void *__restrict ptr, size_t size, size_t nmemb, FILE *__restrict stream)