diff options
| author | Stefan Monnier | 2012-11-08 14:12:23 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2012-11-08 14:12:23 -0500 |
| commit | b7432bb20f48902994bee522bea15acdb0c0e209 (patch) | |
| tree | 940e242625e16ade096c4144d728c56107aa7005 /src/composite.c | |
| parent | 880027430c5580abf612a82273bd49b75b9fb73c (diff) | |
| download | emacs-b7432bb20f48902994bee522bea15acdb0c0e209.tar.gz emacs-b7432bb20f48902994bee522bea15acdb0c0e209.zip | |
Use ad-hoc comparison function for the profiler's hash-tables.
* src/profiler.c (Qprofiler_backtrace_equal, hashtest_profiler): New vars.
(make_log): Use them.
(handle_profiler_signal): Don't inhibit quit any longer since we don't
call Fequal any more.
(Ffunction_equal): New function.
(cmpfn_profiler, hashfn_profiler): New functions.
(syms_of_profiler): Initialize them.
* src/lisp.h (struct hash_table_test): New struct.
(struct Lisp_Hash_Table): Use it.
* src/alloc.c (mark_object): Mark hash_table_test fields of hash tables.
* src/fns.c (make_hash_table): Take a struct to describe the test.
(cmpfn_eql, cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
(hashfn_equal, hashfn_user_defined): Adjust to new calling convention.
(hash_lookup, hash_remove_from_table): Move assertion checking of
hashfn result here. Check hash-equality before calling cmpfn.
(Fmake_hash_table): Adjust call to make_hash_table.
(hashtest_eq, hashtest_eql, hashtest_equal): New structs.
(syms_of_fns): Initialize them.
* src/emacs.c (main): Move syms_of_fns earlier.
* src/xterm.c (syms_of_xterm):
* src/category.c (hash_get_category_set): Adjust call to make_hash_table.
* src/print.c (print_object): Adjust to new hash-table struct.
* src/composite.c (composition_gstring_put_cache): Adjust to new hashfn.
Diffstat (limited to 'src/composite.c')
| -rw-r--r-- | src/composite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/composite.c b/src/composite.c index 6c603fab3fc..bcde0a4c9e6 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -676,7 +676,7 @@ composition_gstring_put_cache (Lisp_Object gstring, ptrdiff_t len) | |||
| 676 | ptrdiff_t i; | 676 | ptrdiff_t i; |
| 677 | 677 | ||
| 678 | header = LGSTRING_HEADER (gstring); | 678 | header = LGSTRING_HEADER (gstring); |
| 679 | hash = h->hashfn (h, header); | 679 | hash = h->test.hashfn (&h->test, header); |
| 680 | if (len < 0) | 680 | if (len < 0) |
| 681 | { | 681 | { |
| 682 | ptrdiff_t j, glyph_len = LGSTRING_GLYPH_LEN (gstring); | 682 | ptrdiff_t j, glyph_len = LGSTRING_GLYPH_LEN (gstring); |
| @@ -1382,7 +1382,7 @@ composition_update_it (struct composition_it *cmp_it, ptrdiff_t charpos, ptrdiff | |||
| 1382 | } | 1382 | } |
| 1383 | else | 1383 | else |
| 1384 | { | 1384 | { |
| 1385 | /* automatic composition */ | 1385 | /* Automatic composition. */ |
| 1386 | Lisp_Object gstring = composition_gstring_from_id (cmp_it->id); | 1386 | Lisp_Object gstring = composition_gstring_from_id (cmp_it->id); |
| 1387 | Lisp_Object glyph; | 1387 | Lisp_Object glyph; |
| 1388 | ptrdiff_t from; | 1388 | ptrdiff_t from; |