diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs-module.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 099a6a3cf25..a90a9765dbf 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -448,6 +448,14 @@ module_free_global_ref (emacs_env *env, emacs_value ref) | |||
| 448 | Lisp_Object obj = value_to_lisp (ref); | 448 | Lisp_Object obj = value_to_lisp (ref); |
| 449 | ptrdiff_t i = hash_lookup (h, obj, NULL); | 449 | ptrdiff_t i = hash_lookup (h, obj, NULL); |
| 450 | 450 | ||
| 451 | if (module_assertions) | ||
| 452 | { | ||
| 453 | ptrdiff_t n = 0; | ||
| 454 | if (! module_global_reference_p (ref, &n)) | ||
| 455 | module_abort ("Global value was not found in list of %"pD"d globals", | ||
| 456 | n); | ||
| 457 | } | ||
| 458 | |||
| 451 | if (i >= 0) | 459 | if (i >= 0) |
| 452 | { | 460 | { |
| 453 | Lisp_Object value = HASH_VALUE (h, i); | 461 | Lisp_Object value = HASH_VALUE (h, i); |
| @@ -456,11 +464,6 @@ module_free_global_ref (emacs_env *env, emacs_value ref) | |||
| 456 | if (--ref->refcount == 0) | 464 | if (--ref->refcount == 0) |
| 457 | hash_remove_from_table (h, obj); | 465 | hash_remove_from_table (h, obj); |
| 458 | } | 466 | } |
| 459 | else if (module_assertions) | ||
| 460 | { | ||
| 461 | module_abort ("Global value was not found in list of %"pD"d globals", | ||
| 462 | h->count); | ||
| 463 | } | ||
| 464 | } | 467 | } |
| 465 | 468 | ||
| 466 | static enum emacs_funcall_exit | 469 | static enum emacs_funcall_exit |