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 B88EE57FBB4; Mon, 7 Aug 2023 14:11:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B88EE57FBB4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1691406666; bh=w41MY1O5d4JoDrPVDPqvMbMJj7LfxUp/OSYMFCC81Lw=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Q9UG+INQzzbU7WtsBydJowj4n2Au5dR4H/P2tCgkNN+fb9iBnpUMYPnNMIr/ovoID l+cPr9iTDc+YScowz/dDUcOw7O4tbGh/lcKKI+quuNTMNOkhdKaFvqqiUAW5VKFqCL 7VrB9frvU1ooLh8vNp0Zh2NgaLhlw01ejS34FUWk= Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [95.163.41.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6F960420C0B for ; Mon, 7 Aug 2023 14:11:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6F960420C0B Received: by smtp57.i.mail.ru with esmtpa (envelope-from ) id 1qSy8d-00BINN-1o; Mon, 07 Aug 2023 14:11:04 +0300 Date: Mon, 7 Aug 2023 10:57:14 +0000 To: Maxim Kokryashkin Message-ID: References: <1691079347.226418296@f315.i.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1691079347.226418296@f315.i.mail.ru> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD969E04B5EED670DC864E28ABE09E133B4A5846C191BD37C58182A05F5380850404671283D495446F60C114FB7A095A31CCC42058D6C0CAE574432113CE8AF687B X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72F22E6DC541F75D9EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006370CE4B4B08BC34B6C8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D81DE71BFDBAC45CACBCB56F68BFCB5728117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC60CDF180582EB8FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520F8AB6B2BE2218126117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CFF7925326FBF3642CBA3038C0950A5D36C8A9BA7A39EFB766D91E3A1F190DE8FDBA3038C0950A5D36D5E8D9A59859A8B6E6B67F0F38050C1976E601842F6C81A1F004C906525384303E02D724532EE2C3F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CA1D607EB49F9BFEF43847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5E48D5D35692BD074A535D61A906E83CA3729D7C6F4FA30E4F87CCE6106E1FC07E67D4AC08A07B9B0A6C7FFFE744CA7FBCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFF5C128B079D08DA0D45AF043F61020800CC11DFFB7C9423214B4F2DC223553824905B00F5DFE93A26CFA265C340F28BAD9892427AD71C8CC36AAB6F1B516721EA74DFFEFA5DC0E7F02C26D483E81D6BEECAEF3E2CCC1ED8C383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj/xSHLV4ZQPsWMHITxWRR7w== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D531F2BA8D5E9AD6C99F44018D9A838DA41C5E6A6BA515280ED42326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 14/15] test: fix E741 errors by pycodestyle 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Max, Thanks for your review! For me it's totally the same (you can see I use the term 'coro' in the comments right there), but I don't mind your naming, so fixed. Here is the diff: ================================================================================ diff --git a/src/luajit-gdb.py b/src/luajit-gdb.py index 2e0b145b..9075e99f 100644 --- a/src/luajit-gdb.py +++ b/src/luajit-gdb.py @@ -233,15 +233,15 @@ def L(L=None): # lookup a symbol for the main coroutine considering the host app # XXX Fragile: though the loop initialization looks like a crap but it # respects both Python 2 and Python 3. - for coroutine in [L] + list(map(lambda main: lookup(main), ( + for lstate in [L] + list(map(lambda main: lookup(main), ( # LuaJIT main coro (see luajit/src/luajit.c) 'globalL', # Tarantool main coro (see tarantool/src/lua/init.h) 'tarantool_L', # TODO: Add more ))): - if coroutine: - return cast('lua_State *', coroutine) + if lstate: + return cast('lua_State *', lstate) def G(L): diff --git a/src/luajit_lldb.py b/src/luajit_lldb.py index 76fb3141..85c0dcb9 100644 --- a/src/luajit_lldb.py +++ b/src/luajit_lldb.py @@ -453,15 +453,15 @@ def L(L=None): # lookup a symbol for the main coroutine considering the host app # XXX Fragile: though the loop initialization looks like a crap but it # respects both Python 2 and Python 3. - for coroutine in [L] + list(map(lambda main: lookup_global(main), ( + for lstate in [L] + list(map(lambda main: lookup_global(main), ( # LuaJIT main coro (see luajit/src/luajit.c) 'globalL', # Tarantool main coro (see tarantool/src/lua/init.h) 'tarantool_L', # TODO: Add more ))): - if coroutine: - return lua_State(coroutine) + if lstate: + return lua_State(lstate) def tou32(val): @@ -1066,9 +1066,9 @@ coroutine guest stack: If L is ommited the main coroutine is used. ''' def execute(self, debugger, args, result): - coro = self.parse(args) - coro_ptr = cast('lua_State *', coro) if coro is not None else None - print('{}'.format(dump_stack(L(coro_ptr)))) + lstate = self.parse(args) + lstate_ptr = cast('lua_State *', lstate) if coro is not None else None + print('{}'.format(dump_stack(L(lstate_ptr)))) def register_commands(debugger, commands): ================================================================================ On 03.08.23, Maxim Kokryashkin wrote: > > Hi, Igor! > Thanks for the patch! > I don’t think `coroutine` is a great name.`lua_state` seems > to be a better option here. > -- > Best regards, > Maxim Kokryashkin >   >   >   -- Best regards, IM