diff options
Diffstat (limited to 'xmake/core/base/table.lua')
| -rw-r--r-- | xmake/core/base/table.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua index e21680379..3fd35c082 100644 --- a/xmake/core/base/table.lua +++ b/xmake/core/base/table.lua @@ -256,5 +256,15 @@ function table.unique(array, barrier) return array end +-- pack arguments into a table +function table.pack(...) + return { n = select("#", ...), ... } +end + +-- unpack table values +function table.unpack(list, i, j) + return unpack(list, i, j) +end + -- return module: table return table |
