mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
c,cpp: add msgpack_vrefbuffer_migrate, msgpack::vrefbuffer::migrate
This commit is contained in:
parent
232aced926
commit
c2dd22ec10
3 changed files with 36 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue