diff options
| author | Stefan Monnier | 2002-07-07 20:52:08 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-07-07 20:52:08 +0000 |
| commit | 141788b50c5c2d01ef3607885224d474be6bd138 (patch) | |
| tree | 1608cbbd6a2939411cdd5a1c96f9542eac6ccce8 /src | |
| parent | 9e028368b54dc64fdf895cb80c1a60d76771a466 (diff) | |
| download | emacs-141788b50c5c2d01ef3607885224d474be6bd138.tar.gz emacs-141788b50c5c2d01ef3607885224d474be6bd138.zip | |
(HASH_KEY, HASH_VALUE, HASH_NEXT, HASH_HASH, HASH_INDEX)
(HASH_TABLE_SIZE): Move from fns.c.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lisp.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index 6ae8a8d016b..dc38857e85e 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1025,6 +1025,32 @@ struct Lisp_Hash_Table | |||
| 1025 | } \ | 1025 | } \ |
| 1026 | while (0) | 1026 | while (0) |
| 1027 | 1027 | ||
| 1028 | /* Value is the key part of entry IDX in hash table H. */ | ||
| 1029 | |||
| 1030 | #define HASH_KEY(H, IDX) AREF ((H)->key_and_value, 2 * (IDX)) | ||
| 1031 | |||
| 1032 | /* Value is the value part of entry IDX in hash table H. */ | ||
| 1033 | |||
| 1034 | #define HASH_VALUE(H, IDX) AREF ((H)->key_and_value, 2 * (IDX) + 1) | ||
| 1035 | |||
| 1036 | /* Value is the index of the next entry following the one at IDX | ||
| 1037 | in hash table H. */ | ||
| 1038 | |||
| 1039 | #define HASH_NEXT(H, IDX) AREF ((H)->next, (IDX)) | ||
| 1040 | |||
| 1041 | /* Value is the hash code computed for entry IDX in hash table H. */ | ||
| 1042 | |||
| 1043 | #define HASH_HASH(H, IDX) AREF ((H)->hash, (IDX)) | ||
| 1044 | |||
| 1045 | /* Value is the index of the element in hash table H that is the | ||
| 1046 | start of the collision list at index IDX in the index vector of H. */ | ||
| 1047 | |||
| 1048 | #define HASH_INDEX(H, IDX) AREF ((H)->index, (IDX)) | ||
| 1049 | |||
| 1050 | /* Value is the size of hash table H. */ | ||
| 1051 | |||
| 1052 | #define HASH_TABLE_SIZE(H) XVECTOR ((H)->next)->size | ||
| 1053 | |||
| 1028 | /* Default size for hash tables if not specified. */ | 1054 | /* Default size for hash tables if not specified. */ |
| 1029 | 1055 | ||
| 1030 | #define DEFAULT_HASH_SIZE 65 | 1056 | #define DEFAULT_HASH_SIZE 65 |