From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 10B9D2E1E0 for ; Tue, 14 May 2019 22:05:03 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qe4GS11VLvzx for ; Tue, 14 May 2019 22:05:02 -0400 (EDT) Received: from smtp15.mail.ru (smtp15.mail.ru [94.100.176.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id BBF672E024 for ; Tue, 14 May 2019 22:05:02 -0400 (EDT) Date: Wed, 15 May 2019 05:05:00 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 5/7] msgpack: allow to pass 'struct ibuf *' into encode() Message-ID: <20190515020500.GJ3801@atlas> References: <0dbad1e482562fbed3492a9e5d7861a0e8a8ae2f.1557875116.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0dbad1e482562fbed3492a9e5d7861a0e8a8ae2f.1557875116.git.v.shpilevoy@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org * Vladislav Shpilevoy [19/05/15 04:21]: > Before the patch msgpack Lua module provided a method encode() > able to take a custom buffer to encode into. But it should be of > type 'struct ibuf', what made it impossible to use > buffer.IBUF_SHARED as a buffer, because its type is > 'struct ibuf *'. Strangely, but FFI can't convert these types > automatically. > > This commit allows to use 'struct ibuf *' as well, and moves this > functionality into a function in utils.h. Now both msgpack and > merger modules can use ibuf directly and by pointer. ok to push -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32