lua-users home
lua-l archive

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


  Umm ... wait ...

>   switch (slice) {
>   case SOCKADDR :
>     return sa_root_index(L);

doesn't sa_root_index() *set* the userslice?  You can call
lua_getuserslice() *before* you set it?  This is where I'm lost.  I'm not
following this code at all.

The default slice (slice is a silly name, it's just an user defined tag)  is 0, or we can set it after lua_newuserdata.