#ifdef HAVE_MODULES
/* Create a new module user ptr object. */
Lisp_Object
-make_user_ptr (void (*finalizer) (void*), void *p)
+make_user_ptr (void (*finalizer) (void *), void *p)
{
Lisp_Object obj;
struct Lisp_User_Ptr *uptr;
return (uintptr_t) p % GCALIGNMENT == 0;
}
+#ifndef HAVE_MODULES
+enum { HAVE_MODULES = false };
+#endif
+
/* If P points to Lisp data, mark that as live if it isn't already
marked. */
VALGRIND_MAKE_MEM_DEFINED (&p, sizeof (p));
#endif
- if (
-#ifdef HAVE_MODULES
- sizeof (Lisp_Object) == sizeof (void *)
-#else
- true
-#endif
- )
+ if (sizeof (Lisp_Object) == sizeof (void *) || !HAVE_MODULES)
{
if (!maybe_lisp_pointer (p))
return;
}
else
- /* For the wide-int case, we also have to accept emacs_value "tagged
- pointers", which can be generated by emacs-module.c's value_to_lisp. */
- p = (void*)((uintptr_t) p & ~(GCALIGNMENT - 1));
+ {
+ /* For the wide-int case, also mark emacs_value tagged pointers,
+ which can be generated by emacs-module.c's value_to_lisp. */
+ p = (void *) ((uintptr_t) p & ~(GCALIGNMENT - 1));
+ }
m = mem_find (p);
if (m != MEM_NIL)
away. The only reference to the life string is through the
pointer `s'. */
- for (pp = start; (void*)pp < end; pp = pp + GC_POINTER_ALIGNMENT)
+ for (pp = start; (void *) pp < end; pp += GC_POINTER_ALIGNMENT)
{
mark_maybe_pointer (*(void **) pp);
mark_maybe_object (*(Lisp_Object *) pp);
#ifdef HAVE_MODULES
/* Defined in alloc.c. */
-extern Lisp_Object make_user_ptr (void (*finalizer) (void*), void *p);
+extern Lisp_Object make_user_ptr (void (*finalizer) (void *), void *p);
/* Defined in emacs-module.c. */
extern void module_init (void);