Lisp_Object obj = value_to_lisp (ref);
ptrdiff_t i = hash_lookup (h, obj, NULL);
+ if (module_assertions)
+ {
+ ptrdiff_t n = 0;
+ if (! module_global_reference_p (ref, &n))
+ module_abort ("Global value was not found in list of %"pD"d globals",
+ n);
+ }
+
if (i >= 0)
{
Lisp_Object value = HASH_VALUE (h, i);
if (--ref->refcount == 0)
hash_remove_from_table (h, obj);
}
- else if (module_assertions)
- {
- module_abort ("Global value was not found in list of %"pD"d globals",
- h->count);
- }
}
static enum emacs_funcall_exit