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 84BE0265F7 for ; Mon, 11 Feb 2019 18:53:56 -0500 (EST) 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 LlXhcPSxk4MO for ; Mon, 11 Feb 2019 18:53:56 -0500 (EST) Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) (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 408F62108B for ; Mon, 11 Feb 2019 18:53:56 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: [tarantool-patches] Re: [PATCH 1/2] sql: add sqlite3 msgpack result function From: "n.pettik" In-Reply-To: <367affe7a5ed5f1acd195c900e25aa85249bcf0e.1548547565.git.roman.habibov@tarantool.org> Date: Tue, 12 Feb 2019 02:53:54 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <11192B00-605E-411C-A5B9-1E577BAEB948@tarantool.org> References: <367affe7a5ed5f1acd195c900e25aa85249bcf0e.1548547565.git.roman.habibov@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: tarantool-patches@freelists.org Cc: Roman Khabibov > On 27 Jan 2019, at 03:28, Roman Khabibov = wrote: >=20 > Add function like sqlite3_result_blob that sets subtype of out = parameter as > SQL_SUBTYPE_MSGPACK. It allows to encode msg pack fields. >=20 > Needed for #3372 > --- > src/box/sql/sqliteInt.h | 3 +++ > src/box/sql/vdbeapi.c | 13 +++++++++++++ > 2 files changed, 16 insertions(+) >=20 > diff --git a/src/box/sql/sqliteInt.h b/src/box/sql/sqliteInt.h > index 7e16edc9a..9b4db93d3 100644 > --- a/src/box/sql/sqliteInt.h > +++ b/src/box/sql/sqliteInt.h > @@ -465,6 +465,9 @@ sqlite3_value_numeric_type(sqlite3_value *); > sqlite3 * > sqlite3_context_db_handle(sqlite3_context *); >=20 > +void > +sqlite3_result_msgpack(sqlite3_context *, const void *, > + int, void (*)(void *)); Broken indentation; add named arguments. >=20 > void > sqlite3_result_blob(sqlite3_context *, const void *, > diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c > index 9e57af051..ed7b67e3b 100644 > --- a/src/box/sql/vdbeapi.c > +++ b/src/box/sql/vdbeapi.c > @@ -360,6 +360,19 @@ invokeValueDestructor(const void *p, /* Value = to destroy */ > return SQLITE_TOOBIG; > } >=20 > +void > +sqlite3_result_msgpack(sqlite3_context * pCtx, > + const void *z, int n, void (*xDel) (void *) > + ) The same is here. At least, fix names of params according to our = codestyle.=20