mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 10:19:51 +00:00
msgpack_zone_clear, msgpack::zone::clear
This commit is contained in:
parent
ef1c4f82b2
commit
b33ecbd92b
6 changed files with 55 additions and 1 deletions
|
|
@ -64,6 +64,9 @@ public:
|
|||
// otherwise the memrory will leak.
|
||||
zone* release_zone();
|
||||
|
||||
/*! 5.2. this method is equivalence to `delete release_zone()` */
|
||||
void reset_zone();
|
||||
|
||||
/*! 5.3. after release_zone(), re-initialize unpacker */
|
||||
void reset();
|
||||
|
||||
|
|
@ -217,6 +220,11 @@ inline zone* unpacker::release_zone()
|
|||
return r;
|
||||
}
|
||||
|
||||
inline void unpacker::reset_zone()
|
||||
{
|
||||
msgpack_unpacker_reset_zone(this);
|
||||
}
|
||||
|
||||
inline void unpacker::reset()
|
||||
{
|
||||
msgpack_unpacker_reset(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue