diff options
| author | Stefan Monnier | 2017-02-18 22:37:05 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2017-02-18 22:37:05 -0500 |
| commit | fe927ecfe45f66ec58d9e7cab6f2526fc87a6803 (patch) | |
| tree | 2bf00f13cb623dcdebda530dfcef75af69a4a13a /src/lisp.h | |
| parent | b2a83eed23d540b4b0ab9e0bf5605821011bfd7d (diff) | |
| download | emacs-fe927ecfe45f66ec58d9e7cab6f2526fc87a6803.tar.gz emacs-fe927ecfe45f66ec58d9e7cab6f2526fc87a6803.zip | |
Change type of `rehash_threshold' and `pure' fields in hash-tables
* src/lisp.h (struct Lisp_Hash_Table): Change type of
`rehash_threshold' and `pure' fields and move them after `count'.
* src/fns.c (make_hash_table): Change type of `rehash_threshold' and `pure'.
(Fmake_hash_table, Fhash_table_rehash_threshold):
* src/category.c (hash_get_category_set):
* src/xterm.c (syms_of_xterm):
* src/profiler.c (make_log):
* src/print.c (print_object):
* src/alloc.c (purecopy_hash_table, purecopy): Adjust accordingly.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/lisp.h b/src/lisp.h index 080bcf74ce6..985d54a0795 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1974,10 +1974,6 @@ struct Lisp_Hash_Table | |||
| 1974 | new size by multiplying the old size with this factor. */ | 1974 | new size by multiplying the old size with this factor. */ |
| 1975 | Lisp_Object rehash_size; | 1975 | Lisp_Object rehash_size; |
| 1976 | 1976 | ||
| 1977 | /* Resize hash table when number of entries/ table size is >= this | ||
| 1978 | ratio, a float. */ | ||
| 1979 | Lisp_Object rehash_threshold; | ||
| 1980 | |||
| 1981 | /* Vector of hash codes. If hash[I] is nil, this means that the | 1977 | /* Vector of hash codes. If hash[I] is nil, this means that the |
| 1982 | I-th entry is unused. */ | 1978 | I-th entry is unused. */ |
| 1983 | Lisp_Object hash; | 1979 | Lisp_Object hash; |
| @@ -1995,10 +1991,6 @@ struct Lisp_Hash_Table | |||
| 1995 | hash table size to reduce collisions. */ | 1991 | hash table size to reduce collisions. */ |
| 1996 | Lisp_Object index; | 1992 | Lisp_Object index; |
| 1997 | 1993 | ||
| 1998 | /* Non-nil if the table can be purecopied. The table cannot be | ||
| 1999 | changed afterwards. */ | ||
| 2000 | Lisp_Object pure; | ||
| 2001 | |||
| 2002 | /* Only the fields above are traced normally by the GC. The ones below | 1994 | /* Only the fields above are traced normally by the GC. The ones below |
| 2003 | `count' are special and are either ignored by the GC or traced in | 1995 | `count' are special and are either ignored by the GC or traced in |
| 2004 | a special way (e.g. because of weakness). */ | 1996 | a special way (e.g. because of weakness). */ |
| @@ -2006,6 +1998,14 @@ struct Lisp_Hash_Table | |||
| 2006 | /* Number of key/value entries in the table. */ | 1998 | /* Number of key/value entries in the table. */ |
| 2007 | ptrdiff_t count; | 1999 | ptrdiff_t count; |
| 2008 | 2000 | ||
| 2001 | /* Non-nil if the table can be purecopied. The table cannot be | ||
| 2002 | changed afterwards. */ | ||
| 2003 | bool_bf pure : 1; | ||
| 2004 | |||
| 2005 | /* Resize hash table when number of entries/ table size is >= this | ||
| 2006 | ratio, a float. */ | ||
| 2007 | float rehash_threshold; | ||
| 2008 | |||
| 2009 | /* Vector of keys and values. The key of item I is found at index | 2009 | /* Vector of keys and values. The key of item I is found at index |
| 2010 | 2 * I, the value is found at index 2 * I + 1. | 2010 | 2 * I, the value is found at index 2 * I + 1. |
| 2011 | This is gc_marked specially if the table is weak. */ | 2011 | This is gc_marked specially if the table is weak. */ |
| @@ -3361,8 +3361,10 @@ extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t); | |||
| 3361 | extern void sweep_weak_hash_tables (void); | 3361 | extern void sweep_weak_hash_tables (void); |
| 3362 | EMACS_UINT hash_string (char const *, ptrdiff_t); | 3362 | EMACS_UINT hash_string (char const *, ptrdiff_t); |
| 3363 | EMACS_UINT sxhash (Lisp_Object, int); | 3363 | EMACS_UINT sxhash (Lisp_Object, int); |
| 3364 | Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object, | 3364 | Lisp_Object make_hash_table (struct hash_table_test test, |
| 3365 | Lisp_Object, Lisp_Object, Lisp_Object); | 3365 | Lisp_Object size, Lisp_Object rehash_size, |
| 3366 | float rehash_threshold, Lisp_Object weak, | ||
| 3367 | bool pure); | ||
| 3366 | ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, EMACS_UINT *); | 3368 | ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, EMACS_UINT *); |
| 3367 | ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, | 3369 | ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, |
| 3368 | EMACS_UINT); | 3370 | EMACS_UINT); |