c,cpp: add msgpack_vrefbuffer_migrate, msgpack::vrefbuffer::migrate

This commit is contained in:
frsyuki
2009-12-19 22:09:29 +09:00
parent 232aced926
commit c2dd22ec10
3 changed files with 36 additions and 1 deletions

View File

@@ -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;