⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ds_hash.private.h

📁 Coda分布式文件系统源代码。其特色在于可以支持离线文件操作以及在线后的自动更新
💻 H
字号:
/*** ds_hash.private.h: Implementation details of ds_hash_t, ds_hash_elt_t*/#ifndef _DS_HASH_PRIVATE_H_#define _DS_HASH_PRIVATE_H_#include <odytypes.h>#include "ds_list.h"  /* we're a client of lists */#include "ds_hash.h"  /* public parts *//* magic numbers for structures */extern magic_t ds_hash_magic;extern magic_t ds_hash_iter_magic;/* A hash table has a magic number, an array of ds_list_t's,    and a count of the number of elements.   The safety and duplicate properties are maintained by the   table's lists; the table doesn't bother about it.   Hash tables are pretty simple: lists do most of the work   They also don't need to keep track of their iterators: the lists   do that (remember, that a hash iterator is just a list iterator   that is pointed at several lists in a row.)*/struct ds_hash_t {    magic_t       magic;    HFN           hfn;    int           nbuckets;    ds_list_t   **buckets;    int           count;};struct ds_hash_iter_t {    magic_t         magic;    ds_hash_t      *table;    int             curbucket;    ds_list_iter_t *curiter;};#define DS_HASH_VALID(tp)      ((tp) && ((tp)->magic == ds_hash_magic))#define DS_HASH_ITER_VALID(ip) ((ip) && ((ip)->magic == ds_hash_iter_magic))#endif /* _DS_HASH_PRIVATE_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -