$$ = new t_const_value();
$$->set_integer($1);
if (!g_allow_64bit_consts && ($1 < INT32_MIN || $1 > INT32_MAX)) {
- pwarning(1, "64-bit constant \"%"PRIi64"\" may not work in all languages.\n", $1);
+ pwarning(1, "64-bit constant \"%" PRIi64"\" may not work in all languages.\n", $1);
}
}
| tok_dub_constant
* warn if the user-specified negative value isn't what
* thrift would have auto-assigned.
*/
- pwarning(1, "Nonpositive field key (%"PRIi64") differs from what would be "
+ pwarning(1, "Nonpositive field key (%" PRIi64") differs from what would be "
"auto-assigned by thrift (%d).\n", $1, y_field_val);
}
/*
using namespace boost;
int main(int argc, char** argv) {
- shared_ptr<TTransport> socket(new TSocket("localhost", 9090));
- shared_ptr<TTransport> transport(new TBufferedTransport(socket));
- shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport));
+ boost::shared_ptr<TTransport> socket(new TSocket("localhost", 9090));
+ boost::shared_ptr<TTransport> transport(new TBufferedTransport(socket));
+ boost::shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport));
CalculatorClient client(protocol);
try {
int main(int argc, char **argv) {
- shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
- shared_ptr<CalculatorHandler> handler(new CalculatorHandler());
- shared_ptr<TProcessor> processor(new CalculatorProcessor(handler));
- shared_ptr<TServerTransport> serverTransport(new TServerSocket(9090));
- shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
+ boost::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+ boost::shared_ptr<CalculatorHandler> handler(new CalculatorHandler());
+ boost::shared_ptr<TProcessor> processor(new CalculatorProcessor(handler));
+ boost::shared_ptr<TServerTransport> serverTransport(new TServerSocket(9090));
+ boost::shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
TSimpleServer server(processor,
serverTransport,
/**
* Or you could do one of these
- shared_ptr<ThreadManager> threadManager =
+ boost::shared_ptr<ThreadManager> threadManager =
ThreadManager::newSimpleThreadManager(workerCount);
- shared_ptr<PosixThreadFactory> threadFactory =
- shared_ptr<PosixThreadFactory>(new PosixThreadFactory());
+ boost::shared_ptr<PosixThreadFactory> threadFactory =
+ boost::shared_ptr<PosixThreadFactory>(new PosixThreadFactory());
threadManager->threadFactory(threadFactory);
threadManager->start();
TThreadPoolServer server(processor,