--- fbzmq/zmq/tests/Test.thrift +++ fbzmq/zmq/tests/Test.thrift @@ -7,10 +7,13 @@ namespace cpp2 fbzmq.test +include "thrift/annotation/cpp.thrift" + cpp_include "folly/io/IOBuf.h" // we'll use raw IOBuf to pass our serialized thrift data -typedef binary (cpp2.type = "folly::IOBuf") IOBuf +@cpp.Type{name = "folly::IOBuf"} +typedef binary IOBuf // we'll be writing this structure into KV store struct TestValue { --- fbzmq/service/if/Monitor.thrift +++ fbzmq/service/if/Monitor.thrift @@ -12,6 +12,8 @@ namespace py fbzmq.Monitor namespace py3 fbzmq.thrift +include "thrift/annotation/cpp.thrift" + enum MonitorCommand { // operations on counters in the monitor SET_COUNTER_VALUES = 1, @@ -42,9 +44,8 @@ // last update timestamp in microseconds 12: i64 timestamp; } -typedef map ( - cpp.type = "std::unordered_map", -) CounterMap +@cpp.Type{name = "std::unordered_map"} +typedef map CounterMap // parameters for SET_COUNTER_VALUES command struct CounterSetParams { --- fbzmq/examples/if/Example.thrift +++ fbzmq/examples/if/Example.thrift @@ -25,7 +25,7 @@ struct Response { 1: required bool success; // value not used if it's a KEY_SET command - 2: optional i64 value = 99; + 2: i64 value = 99; } struct StrValue {