From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 1 Dec 2018 20:24:37 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH v4 2/5] iproto: replace obuf by mpstream in execute.c Message-ID: <20181201172437.ryo653yenvariiev@esperanza> References: <1543605930.497044149@f516.i.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1543605930.497044149@f516.i.mail.ru> To: =?utf-8?B?0JzQtdGA0LPQtdC9INCY0LzQtdC10LI=?= Cc: v.shpilevoy@tarantool.org, tarantool-patches@freelists.org, kostja@tarantool.org List-ID: On Fri, Nov 30, 2018 at 10:25:30PM +0300, Мерген Имеев wrote: > >@@ -555,18 +545,11 @@ sql_get_description(struct sqlite3_stmt *stmt, struct obuf *out, > >     * column_name simply returns them. > >     */ > >    assert(name != NULL); > >-   size += mp_sizeof_str(strlen(name)); > >-   size += mp_sizeof_str(strlen(type)); > >-   char *pos = (char *) obuf_alloc(out, size); > >-   if (pos == NULL) { > >-     diag_set(OutOfMemory, size, "obuf_alloc", "pos"); > >-     return -1; > >-   } > >-   pos = mp_encode_map(pos, 2); > >-   pos = mp_encode_uint(pos, IPROTO_FIELD_NAME); > >-   pos = mp_encode_str(pos, name, strlen(name)); > >-   pos = mp_encode_uint(pos, IPROTO_FIELD_TYPE); > >-   pos = mp_encode_str(pos, type, strlen(type)); > >+   mpstream_encode_map(stream, 2); > >+   mpstream_encode_uint(stream, IPROTO_FIELD_NAME); > >+   mpstream_encode_str(stream, name); > >+   mpstream_encode_uint(stream, IPROTO_FIELD_TYPE); > >+   mpstream_encode_str(stream, type); > >  } > >  return 0; > > } The patch is mangled - tabs have been replaced with spaces - so I can't review it as it is now. Please fix your editor/mua/whatever and resend.