summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@users.sourceforge.jp>2009-12-19 22:09:29 +0900
committerfrsyuki <frsyuki@users.sourceforge.jp>2009-12-19 22:09:29 +0900
commitc2dd22ec102d12374b97f4ae32dccdaaca8630cd (patch)
tree0ac27ac3133898b319cf56d3dcd6910a21f7826c /cpp
parent232aced926635a7054ac4081d472529cdf96f749 (diff)
downloadmsgpack-python-c2dd22ec102d12374b97f4ae32dccdaaca8630cd.tar.gz
c,cpp: add msgpack_vrefbuffer_migrate, msgpack::vrefbuffer::migrate
Diffstat (limited to 'cpp')
-rw-r--r--cpp/vrefbuffer.hpp7
1 files changed, 7 insertions, 0 deletions
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;