From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 8A3B34696C0 for ; Tue, 19 May 2020 23:48:49 +0300 (MSK) From: Vladislav Shpilevoy References: <1b15d2ad18263ed060088aa4f7e105b574c07ffa.1589240001.git.v.shpilevoy@tarantool.org> Message-ID: Date: Tue, 19 May 2020 22:48:47 +0200 MIME-Version: 1.0 In-Reply-To: <1b15d2ad18263ed060088aa4f7e105b574c07ffa.1589240001.git.v.shpilevoy@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH msgpuck 2/2] Make MP_EXT mp_snprint() and mp_fprint() customizable List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, gorcunov@gmail.com, sergepetrenko@tarantool.org, Alexander Turenko Changed some comments: ==================== diff --git a/msgpuck.h b/msgpuck.h index a92f177..16d72d5 100644 --- a/msgpuck.h +++ b/msgpuck.h @@ -983,6 +983,9 @@ mp_vformat(char *data, size_t data_size, const char *format, va_list args); * a standard JSON, printing a MessagePack buffer, having MP_EXT * in it, may lead to an invalid JSON. * + * However MP_EXT may be printed differently in case a proper + * virtual serializer was installed. \sa mp_fprint_ext_f. + * * \param file - pointer to file (or NULL for stdout) * \param data - pointer to buffer containing msgpack object * \retval >=0 - the number of bytes printed @@ -1011,7 +1014,11 @@ extern mp_fprint_ext_f mp_fprint_ext; /** * \brief Default MP_EXT serializer into a file. Skips the object, - * ignores all the other arguments, and writes 'undefined'. + * ignores all the other arguments, and writes + * + * (extension: type , len ) + * + * \sa mp_fprint(). */ int mp_fprint_ext_default(FILE *file, const char **data, int depth); @@ -1056,7 +1063,10 @@ extern mp_snprint_ext_f mp_snprint_ext; /** * \brief Default MP_EXT serializer into a string. Skips the * object, ignores all the other arguments, and prints - * 'undefined'. + * + * (extension: type , len ) + * + * \sa mp_snprint(). */ int mp_snprint_ext_default(char *buf, int size, const char **data, int depth);