equal
deleted
inserted
replaced
164 /// Returns iterator over child nodes of given node. Optionally filters childs by name. |
164 /// Returns iterator over child nodes of given node. Optionally filters childs by name. |
165 /// A: string (name, optional) |
165 /// A: string (name, optional) |
166 /// R: iterator function, lm message node object, nil |
166 /// R: iterator function, lm message node object, nil |
167 int children_lm_node (lua_State *L) |
167 int children_lm_node (lua_State *L) |
168 { |
168 { |
169 LmMessageNode *node = luaL_checkLmMessageNode (L, 1); |
|
170 |
|
171 if (lua_type (L, 2) != LUA_TSTRING) |
169 if (lua_type (L, 2) != LUA_TSTRING) |
172 lua_pushnil (L); |
170 lua_pushnil (L); |
173 |
171 |
174 lua_pushcclosure (L, children_iterator_lm_node, 1); |
172 lua_pushcclosure (L, children_iterator_lm_node, 1); |
175 lua_pushvalue (L, 1); |
173 lua_pushvalue (L, 1); |