From be76a99edc434b93bea4a6fada2cb80ded950978 Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Tue, 30 Jun 2020 23:14:41 +0900 Subject: [PATCH] Updated v2_0_c_overview (markdown) --- v2_0_c_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2_0_c_overview.md b/v2_0_c_overview.md index a9abad6..58ab708 100644 --- a/v2_0_c_overview.md +++ b/v2_0_c_overview.md @@ -113,7 +113,7 @@ Those functions are corresponding to [msgpack format](https://github.com/msgpack To pack STR, RAW(v4 format), BIN, and EXT, call `msgpack_pack_[str|v4raw|bin|ext]` to provide a size and then call `msgpack_pack_[str|v4raw|bin|ext]_body` to provide a payload. To pack ARRAY, call `msgpack_pack_array` to provide the number of elements and then call any `msgpack_pack_*` functions the number times. To pack MAP, call `msgpack_pack_map` to provide the number of elements and then call any `msgpack_pack_*` functions the number*2 times (key and value). -When you use packer as value (not pointer), you don't need to call destroy function. Be careful that [msgpack_packer_free](https://github.com/msgpack/msgpack-c/blob/c_master/include/msgpack/pack.h#L53) is not a destroy function for a packer as value. It is for [msgpack_packer_new](https://github.com/msgpack/msgpack-c/blob/c_master/include/msgpack/pack.h#L52). If you want to create a packer on heap, call `msgpack_packer_new` to create a packer and `msgpack_packer_free` to destroy(free) the packer. +When you use packer as value (not pointer), you don't need to call destroy function. Be careful that [msgpack_packer_free](https://github.com/msgpack/msgpack-c/blob/c_master/include/msgpack/pack.h#L46) is not a destroy function for a packer as value. It is for [msgpack_packer_new](https://github.com/msgpack/msgpack-c/blob/c_master/include/msgpack/pack.h#L45). If you want to create a packer on heap, call `msgpack_packer_new` to create a packer and `msgpack_packer_free` to destroy(free) the packer. ### Unpack