unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lynn Winebarger <owinebar@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel <emacs-devel@gnu.org>
Subject: Re: Objects that can't be purified during dumping
Date: Sat, 23 Jul 2022 11:55:06 -0400	[thread overview]
Message-ID: <jwv4jz76d14.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAM=F=bBDZ5ss2YAUrWQb322K2x0afcHM97NzH=KrA8dJNdpn8w@mail.gmail.com> (Lynn Winebarger's message of "Sat, 23 Jul 2022 09:59:18 -0400")

> 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




  parent reply	other threads:[~2022-07-23 15:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 12:19 Objects that can't be purified during dumping Lynn Winebarger
2022-07-23 13:27 ` Eli Zaretskii
2022-07-23 13:59   ` Lynn Winebarger
2022-07-23 15:27     ` Eli Zaretskii
2022-07-23 15:55     ` Stefan Monnier [this message]
2022-07-24 12:16       ` Lynn Winebarger
2022-07-24 15:07         ` Stefan Monnier
2022-07-24 15:08           ` Eli Zaretskii
2022-08-07 11:27           ` Lynn Winebarger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4jz76d14.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=owinebar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).