Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / grpc / deps / grpc / third_party / upb / examples / bazel / test_binary.c
1
2 #include <time.h>
3
4 #include "foo.upb.h"
5
6 int main() {
7   upb_arena *arena = upb_arena_new();
8   Foo* foo = Foo_new(arena);
9   const char greeting[] = "Hello, World!\n";
10
11   Foo_set_time(foo, time(NULL));
12   /* Warning: the proto will not copy this, the string data must outlive
13    * the proto. */
14   Foo_set_greeting(foo, upb_strview_makez(greeting));
15
16   upb_arena_free(arena);
17 }