Skip to main content

unpack

Function unpack 

Source
pub fn unpack(state: &mut LuaState) -> Result<usize, LuaError>
Expand description

table.unpack(t, [i, [j]]). Pushes t[i], t[i+1], …, t[j] (defaults i=1, j=#t) and returns the count. An i > e range is empty (zero results); a span of INT_MAX or more — including the i64-extreme wrap where e - i overflows to a huge unsigned value — raises “too many results to unpack” rather than attempting the push (pinned by v52_plus_unpack_* / v53_plus_unpack_*). A 5.2 addition.