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

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Sep 29 01:21:12 MSK 2020


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?

If you need it so badly, at least we need a wrapper around luaL_Reg
or we need to expose it and document too. Probably Igor has better ideas.

> +
>  /**
>   * @brief Checks whether a value on the Lua stack is a cdata.
>   *
> @@ -442,6 +444,8 @@ luaL_checkfield(struct lua_State *L, struct luaL_serializer *cfg, int idx,
>  	luaL_convertfield(L, cfg, idx, field);
>  }
>  
> +/** \cond public */
> +
>  void
>  luaL_register_type(struct lua_State *L, const char *type_name,
>  		   const struct luaL_Reg *methods);

2. These newly exported methods don't have a single comment. Why?


More information about the Tarantool-patches mailing list