util.ztact: Fixed global accesses.

Thu, 01 Apr 2010 19:28:23 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 01 Apr 2010 19:28:23 +0500
changeset 2958
49d6bf241653
parent 2957
805b067cd13e
child 2960
de405832bfb6

util.ztact: Fixed global accesses.

util/ztact.lua file | annotate | diff | comparison | revisions
--- a/util/ztact.lua	Thu Apr 01 19:27:26 2010 +0500
+++ b/util/ztact.lua	Thu Apr 01 19:28:23 2010 +0500
@@ -114,7 +114,7 @@
 
 function tostring_r (d, indent, tab0)    -- - - - - - - - - - - - -  tostring_r
 
-  tab1 = tab0 or {}
+  local tab1 = tab0 or {}
   local rep = string.rep ('  ', indent or 0)
   if type (d) == 'table' then
     for k,v in pairs (d) do
@@ -210,7 +210,7 @@
 
 
 local function test_queue ()
-  t = {}
+  local t = {}
   enqueue (t, 1)
   enqueue (t, 2)
   enqueue (t, 3)

mercurial