lm_message_node.c
changeset 45 1fcec4b012a7
parent 39 c5a487f2fd7f
child 54 6bef2082e5f9
equal deleted inserted replaced
44:afe0184885a0 45:1fcec4b012a7
   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);