Subject: bug#22737: 25.1; Finalizer should be optional in dynamic modules

From: Jess Balint <[email-masked]>
Date: Thu, 18 Feb 2016 15:52:55 -0600

Dynamic modules are really cool so far, but I think finalizers should
not be mandatory for user pointers (alloc.c):

#ifdef HAVE_MODULES
	      else if (mblk->markers[i].m.u_any.type == Lisp_Misc_User_Ptr)
		{
		  struct Lisp_User_Ptr *uptr = &mblk->markers[i].m.u_user_ptr;
		  uptr->finalizer (uptr->p); <----- should NULL-check first
		}
#endif

c.f. https://github.com/emacs-mirror/emacs/blob/master/src/alloc.c#L6893

Thanks!

Jess