diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 5 | ||||
| -rw-r--r-- | src/lisp.h | 10 |
2 files changed, 7 insertions, 8 deletions
| @@ -4445,9 +4445,8 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) | |||
| 4445 | 4445 | ||
| 4446 | /* Look for `:rehash-threshold THRESHOLD'. */ | 4446 | /* Look for `:rehash-threshold THRESHOLD'. */ |
| 4447 | i = get_key_arg (QCrehash_threshold, nargs, args, used); | 4447 | i = get_key_arg (QCrehash_threshold, nargs, args, used); |
| 4448 | rehash_threshold = | 4448 | rehash_threshold = (!i ? DEFAULT_REHASH_THRESHOLD |
| 4449 | i ? (FLOATP (args[i]) ? XFLOAT_DATA (args[i]) : -1.0) | 4449 | : FLOATP (args[i]) ? XFLOAT_DATA (args[i]) : 0); |
| 4450 | : DEFAULT_REHASH_THRESHOLD; | ||
| 4451 | if (! (0 < rehash_threshold && rehash_threshold <= 1)) | 4450 | if (! (0 < rehash_threshold && rehash_threshold <= 1)) |
| 4452 | signal_error ("Invalid hash table rehash threshold", args[i]); | 4451 | signal_error ("Invalid hash table rehash threshold", args[i]); |
| 4453 | 4452 | ||
diff --git a/src/lisp.h b/src/lisp.h index d8030728a5a..be42b3354e2 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1998,13 +1998,13 @@ struct Lisp_Hash_Table | |||
| 1998 | /* Number of key/value entries in the table. */ | 1998 | /* Number of key/value entries in the table. */ |
| 1999 | ptrdiff_t count; | 1999 | ptrdiff_t count; |
| 2000 | 2000 | ||
| 2001 | /* Non-nil if the table can be purecopied. The table cannot be | 2001 | /* True if the table can be purecopied. The table cannot be |
| 2002 | changed afterwards. */ | 2002 | changed afterwards. */ |
| 2003 | bool_bf pure : 1; | 2003 | bool pure; |
| 2004 | 2004 | ||
| 2005 | /* Resize hash table when number of entries/ table size is >= this | 2005 | /* Resize hash table when number of entries / table size is >= this |
| 2006 | ratio, a float. */ | 2006 | ratio. */ |
| 2007 | float rehash_threshold; | 2007 | double rehash_threshold; |
| 2008 | 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. |