|
> 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;