summaryrefslogtreecommitdiff
path: root/xmake/core/base/table.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-10-27 00:47:28 +0800
committerruki <[email protected]>2023-10-27 00:47:28 +0800
commitab8ceb9f7a8d8faad35d0cf823a7c3395a23eb96 (patch)
tree8c24413b48733882e9a638153bd73da52def7506 /xmake/core/base/table.lua
parent311171bcd0cee217855858b9c94502a40fbfad56 (diff)
improve table.unique
Diffstat (limited to 'xmake/core/base/table.lua')
-rw-r--r--xmake/core/base/table.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua
index 0b368524a..f954596b8 100644
--- a/xmake/core/base/table.lua
+++ b/xmake/core/base/table.lua
@@ -377,6 +377,9 @@ function table.unique(array, barrier)
table.insert(unique, v)
end
end
+ if array.__wrap_locked__ then
+ table.wrap_lock(unique)
+ end
array = unique
end
end
@@ -402,6 +405,9 @@ function table.reverse_unique(array, barrier)
table.insert(unique, 1, v)
end
end
+ if array.__wrap_locked__ then
+ table.wrap_lock(unique)
+ end
array = unique
end
end