lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


David Given wrote:
Shmuel Zeigerman wrote:
That's right regarding local variables' names, but what about table
fields' names? luac keeps them intact, even with the -s option.

You can't change these without changing the behaviour of your program ---
table fields are data, not code.

for i, j in pairs(...) do
  print(i, j) -- will break if i has been munged!
end

I'm afraid I don't understand you. It's not `i' (a local variable) that should have been munged, but table field names (keys of string type).

E.g., instead of:
  local t1 = { height=10, width=20 }
will be:
  local t1 = { a45=10, b099=20 }

--
Shmuel