diff options
| author | ruki <[email protected]> | 2021-09-18 10:41:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-09-18 10:41:08 +0800 |
| commit | 40e0caffcf5b5e1959c47393f7e0bd9b2313a0f1 (patch) | |
| tree | 3b0ab79f60bb775b046cfe55bddf4579bc56e66f /xmake/core/base/table.lua | |
| parent | 73fc586b83edbbaf71f01ea893e47dc4ae1407ef (diff) | |
add table.getn
Diffstat (limited to 'xmake/core/base/table.lua')
| -rw-r--r-- | xmake/core/base/table.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua index 6709ada3a..1e93efd8d 100644 --- a/xmake/core/base/table.lua +++ b/xmake/core/base/table.lua @@ -46,6 +46,13 @@ if not table.new then end end +-- get array length +if not table.getn then + function table.getn(t) + return #t + end +end + -- move values of table(a1) to table(a2) -- -- disable the builtin implementation for android termux/arm64, it will crash when calling `table.move({1, 1}, 1, 2, 1, {})` |
