diff options
| author | Paul Eggert | 2016-04-08 15:33:22 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-04-08 15:33:59 -0700 |
| commit | 6b0d58be9f6caa2fc4125ed98294e1937ee56d2a (patch) | |
| tree | 1e347a21685939c2a69710cc588cdc78f974406c /src/lisp.h | |
| parent | a4aa94d0cdffb45723786aa798174e942d509774 (diff) | |
| download | emacs-6b0d58be9f6caa2fc4125ed98294e1937ee56d2a.tar.gz emacs-6b0d58be9f6caa2fc4125ed98294e1937ee56d2a.zip | |
Minor improvements for hash function primitives
* src/fns.c (hashfn_eql): Define in terms of hashfn_equal and
hashfn_eq rather than reaching inside them.
(hashtest_eq, hashtest_eql, hashtest_equal):
Now constants with initializers.
(syms_of_fns): Omit no-longer-needed initialization.
* src/lisp.h (LISPSYM_INITIALLY): New macro.
(DEFINE_LISP_SYMBOL): Use it.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lisp.h b/src/lisp.h index 170da67c61c..d111a78f3e0 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -721,12 +721,16 @@ struct Lisp_Symbol | |||
| 721 | except the former expands to an integer constant expression. */ | 721 | except the former expands to an integer constant expression. */ |
| 722 | #define XLI_BUILTIN_LISPSYM(iname) TAG_SYMOFFSET ((iname) * sizeof *lispsym) | 722 | #define XLI_BUILTIN_LISPSYM(iname) TAG_SYMOFFSET ((iname) * sizeof *lispsym) |
| 723 | 723 | ||
| 724 | /* LISPSYM_INITIALLY (Qfoo) is equivalent to Qfoo except it is | ||
| 725 | designed for use as an initializer, even for a constant initializer. */ | ||
| 726 | #define LISPSYM_INITIALLY(name) LISP_INITIALLY (XLI_BUILTIN_LISPSYM (i##name)) | ||
| 727 | |||
| 724 | /* Declare extern constants for Lisp symbols. These can be helpful | 728 | /* Declare extern constants for Lisp symbols. These can be helpful |
| 725 | when using a debugger like GDB, on older platforms where the debug | 729 | when using a debugger like GDB, on older platforms where the debug |
| 726 | format does not represent C macros. */ | 730 | format does not represent C macros. */ |
| 727 | #define DEFINE_LISP_SYMBOL(name) \ | 731 | #define DEFINE_LISP_SYMBOL(name) \ |
| 728 | DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name) \ | 732 | DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name) \ |
| 729 | DEFINE_GDB_SYMBOL_END (LISP_INITIALLY (XLI_BUILTIN_LISPSYM (i##name))) | 733 | DEFINE_GDB_SYMBOL_END (LISPSYM_INITIALLY (name)) |
| 730 | 734 | ||
| 731 | /* By default, define macros for Qt, etc., as this leads to a bit | 735 | /* By default, define macros for Qt, etc., as this leads to a bit |
| 732 | better performance in the core Emacs interpreter. A plugin can | 736 | better performance in the core Emacs interpreter. A plugin can |
| @@ -3441,7 +3445,7 @@ ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, EMACS_UINT *); | |||
| 3441 | ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, | 3445 | ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, |
| 3442 | EMACS_UINT); | 3446 | EMACS_UINT); |
| 3443 | void hash_remove_from_table (struct Lisp_Hash_Table *, Lisp_Object); | 3447 | void hash_remove_from_table (struct Lisp_Hash_Table *, Lisp_Object); |
| 3444 | extern struct hash_table_test hashtest_eq, hashtest_eql, hashtest_equal; | 3448 | extern struct hash_table_test const hashtest_eq, hashtest_eql, hashtest_equal; |
| 3445 | extern void validate_subarray (Lisp_Object, Lisp_Object, Lisp_Object, | 3449 | extern void validate_subarray (Lisp_Object, Lisp_Object, Lisp_Object, |
| 3446 | ptrdiff_t, ptrdiff_t *, ptrdiff_t *); | 3450 | ptrdiff_t, ptrdiff_t *, ptrdiff_t *); |
| 3447 | extern Lisp_Object substring_both (Lisp_Object, ptrdiff_t, ptrdiff_t, | 3451 | extern Lisp_Object substring_both (Lisp_Object, ptrdiff_t, ptrdiff_t, |