Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
Add support for custom variable index.
Browse files Browse the repository at this point in the history
  • Loading branch information
Neopallium committed Dec 19, 2011
1 parent 3c38866 commit 86f717e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions record.lua
Expand Up @@ -169,9 +169,9 @@ end,
add_var = function(self, key, value)
self._vars[key] = value
end,
add_rec_var = function(self, rec, name, vname)
add_rec_var = function(self, rec, name, vname, idx)
local name = name or rec.name
local idx = rec._rec_idx
local idx = idx or rec._rec_idx
self._vars[name] = vname or format_variable(name, idx)
self._vars[name .. "::idx"] = idx
end,
Expand Down

0 comments on commit 86f717e

Please sign in to comment.