lua-users home
lua-l archive

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


> >> But I still want to see a API can push multiple values, maybe lua_pushvalues?
> >
> > What would it do?
> >
> It may push several values to stack top, e.g.
> lua_pushvalues(L, 5); /* copy top 5 values to stack top */

You can do that with a loop of lua_pushvalue. Both ways are O(n).

-- Roberto