diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs-module.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 7e0ba3c16c1..ad6c8fb0104 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -315,18 +315,13 @@ module_free_global_ref (emacs_env *env, emacs_value ref) | |||
| 315 | MODULE_FUNCTION_BEGIN (); | 315 | MODULE_FUNCTION_BEGIN (); |
| 316 | struct Lisp_Hash_Table *h = XHASH_TABLE (Vmodule_refs_hash); | 316 | struct Lisp_Hash_Table *h = XHASH_TABLE (Vmodule_refs_hash); |
| 317 | Lisp_Object obj = value_to_lisp (ref); | 317 | Lisp_Object obj = value_to_lisp (ref); |
| 318 | EMACS_UINT hashcode; | 318 | ptrdiff_t i = hash_lookup (h, obj, NULL); |
| 319 | ptrdiff_t i = hash_lookup (h, obj, &hashcode); | ||
| 320 | 319 | ||
| 321 | if (i >= 0) | 320 | if (i >= 0) |
| 322 | { | 321 | { |
| 323 | Lisp_Object value = HASH_VALUE (h, i); | 322 | EMACS_INT refcount = XFASTINT (HASH_VALUE (h, i)) - 1; |
| 324 | EMACS_INT refcount = XFASTINT (value) - 1; | ||
| 325 | if (refcount > 0) | 323 | if (refcount > 0) |
| 326 | { | 324 | set_hash_value_slot (h, i, make_natnum (refcount)); |
| 327 | value = make_natnum (refcount); | ||
| 328 | set_hash_value_slot (h, i, value); | ||
| 329 | } | ||
| 330 | else | 325 | else |
| 331 | { | 326 | { |
| 332 | eassert (refcount == 0); | 327 | eassert (refcount == 0); |