From 5f9dd2add16775cc6aece96e2695c7e475ee1834 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 5 May 2013 22:52:10 +0000 Subject: lualibs (5may13) git-svn-id: svn://tug.org/texlive/trunk@30238 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/luatex/lualibs/lualibs-set.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex/luatex/lualibs/lualibs-set.lua') diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-set.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-set.lua index f844d0b4004..2370f0139ff 100644 --- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-set.lua +++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-set.lua @@ -6,6 +6,8 @@ if not modules then modules = { } end modules ['l-set'] = { license = "see context related readme files" } +-- This will become obsolete when we have the bitset library embedded. + set = set or { } local nums = { } @@ -49,10 +51,11 @@ function set.tolist(n) if n == 0 or not tabs[n] then return "" else - local t = { } + local t, n = { }, 0 for k, v in next, tabs[n] do if v then - t[#t+1] = k + n = n + 1 + t[n] = k end end return concat(t," ") -- cgit v1.2.3