• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 #include <time.h>
3 
4 #include "examples/bazel/foo.upb.h"
5 
main()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 }
18