[Tarantool-patches] [PATCH 2.X 4/7] module api: luaL_register_module & luaL_register_type

Igor Munkin imun at tarantool.org
Tue Sep 29 11:03:04 MSK 2020


Vlad,

I glanced the patch and doubt these functions need to be exported by
Tarantool. These functions neither wrap internals nor provide any
performance benefits (e.g. reduce numbers of excess allocations). It
would be nice to have such auxiliary interfaces in so called "modulekit"
to make third party modules development easier, but I see no problem to
borrow this code to merger/key_def as is for now.

On 29.09.20, Vladislav Shpilevoy wrote:
> Thanks for the patch!
> 
> See 2 comments below.
> 
> On 24.09.2020 19:00, Timur Safin wrote:
> > Exporting `luaL_register_module` & `luaL_register_type`
> > functions as they needed for external merger
> > 
> > diff --git a/src/lua/utils.h b/src/lua/utils.h
> > index 7639cd64a..9b1fe7e57 100644
> > --- a/src/lua/utils.h
> > +++ b/src/lua/utils.h
> > @@ -78,6 +78,8 @@ luaL_pushuuid(struct lua_State *L);
> >  
> >  /** \cond public */
> >  
> > +struct luaL_Reg;
> 
> 1. It does not seem to be public. How are users supposed to work with that?
> Igor, could you please take a look at this?

It's public[1] and is provided by <lauxlib.h> Lua standard header as
Sasha already mentioned it in the thread.

> 

<snipped>

[1]: https://www.lua.org/manual/5.1/manual.html#luaL_Reg

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list