mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-20 22:31:33 +02:00
cpp: fixed missing ctx.user.z = z and release_zone uses pointer swapp instead of copying #42
This commit is contained in:
@@ -335,11 +335,11 @@ msgpack_zone* msgpack_unpacker_release_zone(msgpack_unpacker* mpac)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
msgpack_zone old = *mpac->z;
|
msgpack_zone* old = mpac->z;
|
||||||
*mpac->z = *r;
|
mpac->z = r;
|
||||||
*r = old;
|
CTX_CAST(mpac->ctx)->user.z = mpac->z;
|
||||||
|
|
||||||
return r;
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
void msgpack_unpacker_reset_zone(msgpack_unpacker* mpac)
|
void msgpack_unpacker_reset_zone(msgpack_unpacker* mpac)
|
||||||
|
Reference in New Issue
Block a user