diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2012-07-12 02:01:11 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2012-07-12 02:01:11 -0300 |
commit | b6f415a97ff5470c3673dc08714a5e385c8a68f5 (patch) | |
tree | d005470dfbf79240b05428f947f9c7cd0fd7a762 | |
parent | 2c5ea058d859fda9a139c35c4af787e898fd502e (diff) | |
download | luarocks-b6f415a97ff5470c3673dc08714a5e385c8a68f5.tar.gz luarocks-b6f415a97ff5470c3673dc08714a5e385c8a68f5.tar.bz2 luarocks-b6f415a97ff5470c3673dc08714a5e385c8a68f5.zip |
The persist module is not rockspec-specific
-rw-r--r-- | src/luarocks/persist.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/persist.lua b/src/luarocks/persist.lua index 132c15b7..50cf6d51 100644 --- a/src/luarocks/persist.lua +++ b/src/luarocks/persist.lua | |||
@@ -125,12 +125,12 @@ write_table = function(out, tbl, level, field_order) | |||
125 | out:write("}") | 125 | out:write("}") |
126 | end | 126 | end |
127 | 127 | ||
128 | --- Writes a rockspec table to an io-like object. | 128 | --- Writes a table to an io-like object. |
129 | -- @param out userdata: a file object, open for writing. | 129 | -- @param out userdata: a file object, open for writing. |
130 | -- @param tbl table: the table to be written. | 130 | -- @param tbl table: the table to be written. |
131 | -- @param field_order table: optional prioritization table | 131 | -- @param field_order table: optional prioritization table |
132 | -- @return userdata The file object originally passed in as the `out` parameter. | 132 | -- @return userdata The file object originally passed in as the `out` parameter. |
133 | local function write_rockspec(out, tbl, field_order) | 133 | local function write_table(out, tbl, field_order) |
134 | for k, v, sub_order in util.sortedpairs(tbl, field_order) do | 134 | for k, v, sub_order in util.sortedpairs(tbl, field_order) do |
135 | out:write(k.." = ") | 135 | out:write(k.." = ") |
136 | write_value(out, v, 0, sub_order) | 136 | write_value(out, v, 0, sub_order) |
@@ -149,7 +149,7 @@ end | |||
149 | function save_from_table_to_string(tbl, field_order) | 149 | function save_from_table_to_string(tbl, field_order) |
150 | local out = {buffer = {}} | 150 | local out = {buffer = {}} |
151 | function out:write(data) table.insert(self.buffer, data) end | 151 | function out:write(data) table.insert(self.buffer, data) end |
152 | write_rockspec(out, tbl, field_order) | 152 | write_table(out, tbl, field_order) |
153 | return table.concat(out.buffer) | 153 | return table.concat(out.buffer) |
154 | end | 154 | end |
155 | 155 | ||