lua-users home
lua-l archive

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


What's the best way of copying a lua array(table with continuous
integer keys) to C? The problem is that I don't know the size of the
array(it's not fixed) so I can't malloc the needed memory in C. One
way would be to count the elements first then copy them but then I'd
be doing two times the needed work. Is there a better(faster/cleaner)
way to do this?

Dimitris