From ed853465a281b6f29bf2036d643d24b2ae367d12 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Thu, 21 Feb 2013 19:26:55 +0100 Subject: digital/ucoolib/ucoolib/arch/host/mex: use std::string --- digital/ucoolib/ucoolib/arch/host/mex/mex_node.hh | 3 ++- digital/ucoolib/ucoolib/arch/host/mex/mex_node.host.cc | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'digital/ucoolib') diff --git a/digital/ucoolib/ucoolib/arch/host/mex/mex_node.hh b/digital/ucoolib/ucoolib/arch/host/mex/mex_node.hh index fecb8c00..26fd5a29 100644 --- a/digital/ucoolib/ucoolib/arch/host/mex/mex_node.hh +++ b/digital/ucoolib/ucoolib/arch/host/mex/mex_node.hh @@ -29,6 +29,7 @@ #include #include +#include namespace ucoo { namespace mex { @@ -89,7 +90,7 @@ class Node /// Send a response while handling a request. void response (Msg &msg); /// Reserve a message type. - mtype_t reserve (const char *name); + mtype_t reserve (const std::string &name); /// Register an handler for a message type. void handler_register (mtype_t mtype, Handler &handler); private: diff --git a/digital/ucoolib/ucoolib/arch/host/mex/mex_node.host.cc b/digital/ucoolib/ucoolib/arch/host/mex/mex_node.host.cc index 5fdd81ae..d1a4c703 100644 --- a/digital/ucoolib/ucoolib/arch/host/mex/mex_node.host.cc +++ b/digital/ucoolib/ucoolib/arch/host/mex/mex_node.host.cc @@ -124,11 +124,11 @@ Node::response (Msg &msg) } mtype_t -Node::reserve (const char *name) +Node::reserve (const std::string &name) { // Send request. Msg msg (MTYPE_RES); - msg.push (name, std::strlen (name)); + msg.push (name.data (), name.size ()); send (msg); // Wait for response. std::auto_ptr rsp; -- cgit v1.2.3