shithub: mc

Download patch

ref: de19a8fec7353f9e81a3c4660dd314d5cd15fd02
parent: 8f1e28d8625c561b91e39757e452ca6fa221fd59
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Feb 6 20:52:55 EST 2016

Use std.htbykeyvals in inifile.

--- a/lib/inifile/parse.myr
+++ b/lib/inifile/parse.myr
@@ -25,15 +25,11 @@
 }
 
 const free = {ini
-	var kl
-
-	kl = std.htkeys(ini.elts)
-	for (sect, key) in kl
-		std.slfree(std.htgetv(ini.elts, (sect, key), ""))
+	for ((sect, key), val) in std.htbykeyvals(ini.elts)
+		std.slfree(val)
 		std.slfree(sect)
 		std.slfree(key)
 	;;
-	std.slfree(kl)
 	std.htfree(ini.elts)
 	std.free(ini)
 }