lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Daurnimator once stated:
> On 2 March 2016 at 05:37, Sean Conner <sean@conman.org> wrote:
> >
> > But then you said:
> >
> >> The key thing I counted on is that we have the same **ABI** per registry
> >> key. i.e. that `sigset_t *set = luaL_checkmeta(L, n, "sigset_t")` will
> >> always result in a valid sigset_t pointer.
> >
> >   First, I'm not sure if doing
> >
> >         sigset_t *set = luaL_checkmeta(L,n,"sigset_t");
> >
> > buys you much; I can only think of contrived circumstances where you have
> > two different libraries providing signal sets where that would be an issue.
> 
> The aim is that a user could create a sigset_t with your library; and
> safely pass it to other libraries.
> e.g. https://github.com/daurnimator/lua-spawn/blob/6b78e89bece7cc6a64a3bd74ba6ca255edf1eaa5/spawn/posix.c#L123

  Oh!  You meant another *C* library, not a Lua module!  Okay, that makes
more sense ... 

  -spc