mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-16 15:01:14 +02:00
cpp: unpacker::release_zone() calls msgpack_unpacker_release_zone() #42
This commit is contained in:
parent
23480bfe8a
commit
eb8a338a0e
@ -258,17 +258,7 @@ inline object unpacker::data()
|
||||
|
||||
inline zone* unpacker::release_zone()
|
||||
{
|
||||
if(!msgpack_unpacker_flush_zone(this)) {
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
|
||||
zone* r = new zone();
|
||||
|
||||
msgpack_zone old = *base::z;
|
||||
*base::z = *r;
|
||||
*static_cast<msgpack_zone*>(r) = old;
|
||||
|
||||
return r;
|
||||
return static_cast<msgpack::zone*>(msgpack_unpacker_release_zone(static_cast<msgpack_unpacker*>(this)));
|
||||
}
|
||||
|
||||
inline void unpacker::reset_zone()
|
||||
|
Loading…
x
Reference in New Issue
Block a user