[tarantool-patches] Re: [PATCH v2 7/9] box: sandbox option for persistent functions
Vladimir Davydov
vdavydov.dev at gmail.com
Mon Jun 10 17:41:44 MSK 2019
On Mon, Jun 10, 2019 at 05:15:14PM +0300, Kirill Shcherbatov wrote:
> >> +{
> >> + 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?
I mean rather than calling table.deepcopy function written in Lua,
wouldn't it be more effecient to do deepcopy in C using Lua C API?
Well, never mind. I guess we don't need to optimize this case, as we
only create a sandbox on function creation, not invocation.
More information about the Tarantool-patches
mailing list