lua_newuserdata
newbuff = (char *)lua_newuserdata(L, newsize * sizeof(char));
LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz);
nvlist_t **props = lua_newuserdata(state, sizeof (nvlist_t *));