lua-users home
lua-l archive

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


> struct user *llua_pushuser (lua_State *L, struct user *user_ptr) {
>   struct user *l_user = (struct user*)lua_newuserdata(L, sizeof(struct user*));

I think you need this:

 struct user **l_user = (struct user**)lua_newuserdata(L, sizeof(struct user*));
 *l_user = user_ptr;