From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 079066ECE3; Tue, 2 Nov 2021 14:44:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 079066ECE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1635853442; bh=UDXvkOaqR76rBKZRtBjOKNRws+rZibPypKXtltPzDO0=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=HT+yeceCLS5uhoRkf/dw6TRUHkTP8cVXL2ljfNiY5KJxGB0ozbMjWIrokucrljGna 76RrTkBLSyzuJsAAx4tKJ9a4hwMNLB6zP9IkQE0bOURZEibyyf2x0mw/GxR/SSg5pO Fcj3eWr8ru1WHaf/zesIlaEvgCSj98SE5LvZEmd4= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 CAC7C6ECE3 for ; Tue, 2 Nov 2021 14:44:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CAC7C6ECE3 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mhsCu-0005ia-5y; Tue, 02 Nov 2021 14:44:00 +0300 Date: Tue, 2 Nov 2021 14:43:58 +0300 To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org Message-ID: <20211102114358.GD104458@tarantool.org> References: <86bc99060c5e4a37a4ee5df2c1b98cd8f77e4765.1633713433.git.imeevma@gmail.com> <20211025085458.GM36295@tarantool.org> <65ca3f55-706b-242a-f292-f9e6f242454e@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <65ca3f55-706b-242a-f292-f9e6f242454e@tarantool.org> X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD98893113B6235BE911D97983F9CC51F62C701255081E92A0F182A05F5380850404D45B167AACE26B557C772FF716E42D03D0A810687BCFA2E80C5B8D1AD860E6D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B114C2C2C20B7E62EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374FA524FBD8B89EAA8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8CF63A9A9195AC7E509B5F3DFDFB0AF76117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCB37B5D51F58B3735A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735209647ADFADE5905B1F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B953A8A48A05D51F175ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A57FE692173D533DF72294282A8F34DB848DE67FE36E9162F1D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA752DA3D96DA0CEF5C48E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349320586B19AD2C72EBC3CD4A1FC54DBB7821449A86F9A317C9A6BC74E011A4EA69B5A381760C221A1D7E09C32AA3244C8EA71C6AC3A4B3B32C56AE50BFAA4BCDD08D48398F32B4A6729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojyQYxHpRvLO7fqcYiYJqnbQ== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D0E8430E140992E00FE2C45EEB772197183D72C36FC87018B9F80AB2734326CD2FB559BB5D741EB96352A0ABBE4FDA4210A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 19/21] sql: remove MEM_Dyn flag X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mergen Imeev via Tarantool-patches Reply-To: Mergen Imeev Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thank you for the review! My answer and diff below. On Sat, Oct 30, 2021 at 01:43:12AM +0200, Vladislav Shpilevoy wrote: > Thanks for the fixes! > > SQL_TRANSIENT, SQL_DYNAMIC, and SQL_STATIC can all be deleted here. True, thanks. Fixed. Diff: diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h index 22a4aa5cd..148350d05 100644 --- a/src/box/sql/sqlInt.h +++ b/src/box/sql/sqlInt.h @@ -370,10 +370,6 @@ sql_vsnprintf(int, char *, const char *, va_list); #define MATCH_ONE_WILDCARD '_' #define MATCH_ALL_WILDCARD '%' -typedef void (*sql_destructor_type) (void *); -#define SQL_STATIC ((sql_destructor_type)0) -#define SQL_TRANSIENT ((sql_destructor_type)-1) - /** * Compile the UTF-8 encoded SQL statement into * a statement handle (struct Vdbe). @@ -873,16 +869,6 @@ typedef u64 uptr; */ #define IsPowerOfTwo(X) (((X)&((X)-1))==0) -/* - * The following value as a destructor means to use sqlDbFree(). - * The sqlDbFree() routine requires two parameters instead of the - * one parameter that destructors normally want. So we have to introduce - * this magic value that the code knows to handle differently. Any - * pointer will work here as long as it is distinct from sql_STATIC - * and sql_TRANSIENT. - */ -#define SQL_DYNAMIC ((sql_destructor_type)sqlMallocSize) - /* * The usual case where Writable Static Data (WSD) is supported, * the sql_WSD and GLOBAL macros become no-ops and have zero