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 C028C2B866 for ; Tue, 25 Sep 2018 19:28:00 -0400 (EDT) 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 wvCM2kI5RIA4 for ; Tue, 25 Sep 2018 19:28:00 -0400 (EDT) Received: from smtp5.mail.ru (smtp5.mail.ru [94.100.179.24]) (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 7D5CF2B851 for ; Tue, 25 Sep 2018 19:28:00 -0400 (EDT) Date: Wed, 26 Sep 2018 02:27:57 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 1/3] Set a lua state for the main fiber too Message-ID: <20180925232757.GI3137@chai> References: <113a80904f6f6b4385170d47d6bce1ecb29a6317.1537535602.git.georgy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <113a80904f6f6b4385170d47d6bce1ecb29a6317.1537535602.git.georgy@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: Georgy Kirichenko * Georgy Kirichenko [18/09/22 00:21]: > The main fiber should have a lua state as any other lua fiber. > --- > src/lua/init.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/lua/init.c b/src/lua/init.c > index 8e148904a..07bcca1b9 100644 > --- a/src/lua/init.c > +++ b/src/lua/init.c > @@ -628,6 +628,7 @@ tarantool_lua_run_script(char *path, bool interactive, > script_fiber = fiber_new(title, run_script_f); > if (script_fiber == NULL) > panic("%s", diag_last_error(diag_get())->errmsg); > + script_fiber->storage.lua.stack = tarantool_L; > fiber_start(script_fiber, tarantool_L, path, interactive, > optc, optv, argc, argv); OK to push. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov