From 587333d0b28fbf115783c3de34bc6bf271e06a9d Mon Sep 17 00:00:00 2001 From: Martin Peach Date: Mon, 21 Jul 2014 18:46:54 +0000 Subject: replaced deprecated(Lua5.1) and missing(Lua5.2) table.getn() with the length operator # to obtain length of tables. svn path=/trunk/externals/loaders/pdlua/; revision=17330 --- examples/list-unpack.pd_lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/list-unpack.pd_lua') diff --git a/examples/list-unpack.pd_lua b/examples/list-unpack.pd_lua index 08b635c..ebddc45 100644 --- a/examples/list-unpack.pd_lua +++ b/examples/list-unpack.pd_lua @@ -50,7 +50,8 @@ function ListUnpack:in_1(sel, atoms) -- also unpack selector of anythings table.insert(atoms, 1, sel) end - local size = math.min(self.outlets, table.getn(atoms)) +-- local size = math.min(self.outlets, table.getn(atoms)) + local size = math.min(self.outlets, #(atoms)) for i=size, 1, -1 do self:Outlet(i, atoms[i]) end -- cgit v1.2.1