Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

迭代器 #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

迭代器 #94

wants to merge 1 commit into from

Conversation

zrw269113179
Copy link

No description provided.

@zrw269113179 zrw269113179 changed the title 配合新版本代码 迭代器 Jan 14, 2020
struct sector_meta_data sector;
struct env_node_obj env;
};
typedef struct env_iterator_obj *env_iterator_obj_t;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个迭代器对象类型声明可以定义在 ef_def.h 里

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sector_meta_data 这个类型没有在 ef_def.h里,如果迭代器定义在 ef_def.h里,一堆类型声明都要移过来

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • sector_meta_data
  • sector_store_status_t
  • sector_dirty_status_t

对应的都搬过去就好了

@@ -1195,7 +1202,94 @@ static uint32_t new_env(sector_meta_data_t sector, size_t env_size)

return empty_env;
}
static struct env_iterator_obj _g_env_iter_obj;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

定义在 ef_def.h 后,迭代器就可以支持多实例模式,这里的定义也不需要了

对应的,这些 API 可能也不需要了 ef_env_iterator_to_first ef_env_iterator_now_name ef_env_iterator_now_value_len

你觉得呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants