Skip to content

迭代器#94

Open
zrw269113179 wants to merge 1 commit intoarmink:masterfrom
zrw269113179:iterator
Open

迭代器#94
zrw269113179 wants to merge 1 commit intoarmink:masterfrom
zrw269113179:iterator

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

对应的都搬过去就好了


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

2 participants