Comparison

util/stanza.lua @ 3478:4621c92d2368

util.stanza: stanza:matched_children() -> stanza:matching_tags()
author Matthew Wild <mwild1@gmail.com>
date Mon, 30 Aug 2010 04:55:12 +0100
parent 3477:6350b114e0e4
child 3502:28887137bb1b
comparison
equal deleted inserted replaced
3477:6350b114e0e4 3478:4621c92d2368
124 i = i + 1 124 i = i + 1
125 return a[i]; 125 return a[i];
126 end, self, i; 126 end, self, i;
127 end 127 end
128 128
129 function stanza_mt:matched_children(name, xmlns) 129 function stanza_mt:matching_tags(name, xmlns)
130 xmlns = xmlns or self.attr.xmlns; 130 xmlns = xmlns or self.attr.xmlns;
131 local tags = self.tags; 131 local tags = self.tags;
132 local start_i, max_i = 1, #tags; 132 local start_i, max_i = 1, #tags;
133 return function () 133 return function ()
134 for i=start_i,max_i do 134 for i=start_i,max_i do