-
- gras_dynar_foreach(p_elm->sub, i, p_child) {
- if (p_child)
- TRY(_cursor_push_keys(p_cursor, p_child));
- }
-
- CDEBUG1(dict_cursor, "Count = %d", count);
-
- return errcode;
-}
-
-/**
- * gras_dict_cursor_rewind:
- * @cursor: the cursor
- * @Returns: gras_error_t
- *
- * back to the first element
- */
-gras_error_t
-gras_dict_cursor_rewind(gras_dict_cursor_t *p_cursor) {
- gras_error_t errcode = no_error;
-
- CDEBUG0(dict_cursor, "gras_dict_cursor_rewind");
- gras_assert(p_cursor);
-
- gras_dynar_reset(p_cursor->keys);
- gras_dynar_reset(p_cursor->key_lens);
-
- if (!p_cursor->head)
- return no_error;
-
- TRY(_cursor_push_keys(p_cursor, p_cursor->head));
-
- gras_dynar_cursor_first(p_cursor->keys, &p_cursor->pos );
- gras_dynar_cursor_first(p_cursor->key_lens, &p_cursor->pos_len);
-
- return errcode;