From c2dd22ec102d12374b97f4ae32dccdaaca8630cd Mon Sep 17 00:00:00 2001 From: frsyuki Date: Sat, 19 Dec 2009 22:09:29 +0900 Subject: c,cpp: add msgpack_vrefbuffer_migrate, msgpack::vrefbuffer::migrate --- cpp/vrefbuffer.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cpp') diff --git a/cpp/vrefbuffer.hpp b/cpp/vrefbuffer.hpp index 549d77f..c8eca7b 100644 --- a/cpp/vrefbuffer.hpp +++ b/cpp/vrefbuffer.hpp @@ -71,6 +71,13 @@ public: return msgpack_vrefbuffer_veclen(this); } + void migrate(vrefbuffer* to) + { + if(msgpack_vrefbuffer_migrate(this, to) < 0) { + throw std::bad_alloc(); + } + } + private: typedef msgpack_vrefbuffer base; -- cgit v1.2.1