diff options
| author | Paul Eggert | 2017-02-19 12:22:33 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-02-19 12:23:19 -0800 |
| commit | c8d14cfc6c2d19077d137c7e917fbb4f104de222 (patch) | |
| tree | f04b71e2985c9399af5de2093600855899b009de /src/fns.c | |
| parent | 5c1ebfc504bc0649a9e1105b1d9265c461739254 (diff) | |
| download | emacs-c8d14cfc6c2d19077d137c7e917fbb4f104de222.tar.gz emacs-c8d14cfc6c2d19077d137c7e917fbb4f104de222.zip | |
Fix glitches in recent hash table changes
* src/fns.c (Fmake_hash_table): Simplify the machine code slightly
by using 0 rather than -1.
* src/lisp.h (struct Lisp_Hash_Table.pure): Now bool rather
than a bitfield, for speed (the bitfield did not save space).
(struct Lisp_Hash_Table.rehash_threshold): Now double rather than
float, since the float caused unwanted rounding errors, e.g.,
(hash-table-rehash-threshold (make-hash-table)) yielded
0.800000011920929 instead of the correct 0.8.
Diffstat (limited to 'src/fns.c')
| -rw-r--r-- | src/fns.c | 5 |
1 files changed, 2 insertions, 3 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 | ||