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 4B95A6EC55; Sun, 5 Sep 2021 18:07:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4B95A6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1630854431; bh=Tx5chWMzae7fHC3HxGPRP/HnYfRe8loKT4FPtWDp974=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=xG8V2Es634j1b8XxGwrbADTIZ9D6/zLznzpwU17rEUrDkymWtsUiU8P2gtT4Wz20o PnosSLAWCJMUdpRrx3hEV1Gk9bzrU6GVt2YcKa5VJds/vTF05FdQ+US+QchmXEm641 ntJUkVv1BbL2c/O8q/+k0sjdqhcjn5qdqYoLO1GM= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 B71836EC55 for ; Sun, 5 Sep 2021 18:07:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B71836EC55 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1mMtjg-0003nB-Ft; Sun, 05 Sep 2021 18:07:09 +0300 To: Igor Munkin , olegrok@tarantool.org References: <7ef7fcfec0d2c78721ea17376cbfe0d0f231798c.1630606077.git.babinoleg@mail.ru> <20210903122314.GV5743@tarantool.org> Message-ID: Date: Sun, 5 Sep 2021 17:07:07 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210903122314.GV5743@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9D96C1EA41D18F4D5C0BAD37378C6732F68CF9FDB2FAB06FD182A05F53808504020AD2843C2CFE22A01E32730D08FEAA655DAA20BD816385362B0962BFECD1354 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F65C230EDDCD559EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063767500BC4578134A08638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8DCAE8EE95E16D286B357948878AF0042117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8B974A882099E279BDA471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CB24F08513AFFAC7943847C11F186F3C59DAA53EE0834AAEE X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B5057FEA39CB746018BD15B9EF83A1B86BFC X-C1DE0DAB: 0D63561A33F958A5D17225A7533927E70DD2E5337EFBDB59963E10557ADC7B54D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA752546FE575EB473F1410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D6AC337C1E637B8A52B355B6FD09012EFABC3F14CA71A6202BD85782F8842447499DFAD87F8F47CF1D7E09C32AA3244CA6750D8D3B3E99534CFDA6A845E78ED9BBA718C7E6A9E042927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojci1FPKGSOjE1pNhgFFUcrg== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DF5130E51C900B73F2CB09BA6178D55A43841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 3/3] fiber: keep reference to userdata if fiber created once 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" >> diff --git a/src/lib/core/fiber.c b/src/lib/core/fiber.c >> index 588b78504..39b67f940 100644 >> --- a/src/lib/core/fiber.c >> +++ b/src/lib/core/fiber.c >> @@ -32,6 +32,7 @@ >> >> #include >> #include >> +#include > > Totally agree with Vlad here. I guess you have two options: > * Use the approach similar to . > * Introduce a constant in src/lib/core/fiber.h and add a static assert > in src/lua/utils.h whether this value is the same as in LuaJIT. > > Maybe there are other options Vlad can suggest. I have no better ideas. But among these 2 the one with a constant in fiber.h and a static assert looks better. Less dependencies.