emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objects that can't be purified during dumping


From: Stefan Monnier
Subject: Re: Objects that can't be purified during dumping
Date: Sat, 23 Jul 2022 11:55:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> I recalled seeing an exchange to that effect on this list.   I'll try the
> hack (on alloc.c) and see if it works as an interim solution.

I think you can just do:

    diff --git a/src/alloc.c b/src/alloc.c
    index 6e166d00d5b..acf558f3c7a 100644
    --- a/src/alloc.c
    +++ b/src/alloc.c
    @@ -5611,7 +5611,8 @@ DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0,
     static Lisp_Object
     purecopy (Lisp_Object obj)
     {
    -  if (FIXNUMP (obj)
    +  if (true
    +      || FIXNUMP (obj)
           || (! SYMBOLP (obj) && PURE_P (XPNTR (obj)))
           || SUBRP (obj))
         return obj;    /* Already pure.  */

But, the "pinned" approach as is done for hash-tables should work just
fine as well.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]