From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [tarantool-patches] Re: [PATCH v2 7/9] box: sandbox option for persistent functions References: <6b79e42320697259d90dfbc4ed0ff79882a857ee.1559822429.git.kshcherbatov@tarantool.org> <20190610140645.orrfcqklmum7nhsd@esperanza> From: Kirill Shcherbatov Message-ID: <45e93824-0c46-db7c-13af-134dacef9b23@tarantool.org> Date: Mon, 10 Jun 2019 17:15:14 +0300 MIME-Version: 1.0 In-Reply-To: <20190610140645.orrfcqklmum7nhsd@esperanza> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit To: tarantool-patches@freelists.org, Vladimir Davydov List-ID: >> +{ >> + if (luaL_deepcopy_func_ref == LUA_REFNIL) { >> + int count; >> + const char *deepcopy = "table.deepcopy"; >> + if (luaT_func_find(L, deepcopy, deepcopy + strlen(deepcopy), >> + &count) != 0) >> + return -1; > > Wouldn't it be more effecient to copy the table in C, i.e. without the > aid of 'table.deepcopy' method? What do you mean? ref: https://www.freelists.org/post/tarantool-patches/PATCH-v1-48-box-load-persistent-Lua-functions-on-creation,2