aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert2017-02-19 12:22:33 -0800
committerPaul Eggert2017-02-19 12:23:19 -0800
commitc8d14cfc6c2d19077d137c7e917fbb4f104de222 (patch)
treef04b71e2985c9399af5de2093600855899b009de /src/lisp.h
parent5c1ebfc504bc0649a9e1105b1d9265c461739254 (diff)
downloademacs-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/lisp.h')
-rw-r--r--src/lisp.h10
1 files changed, 5 insertions, 5 deletions
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.