unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Vibhav Pant <vibhavp@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Make purecopy create hash tables properly
Date: Mon, 30 Jan 2017 00:44:45 +0530	[thread overview]
Message-ID: <CA+T2Sh1+us8M6oE8Pih3E6MLFS40XPo4ge2yg5oeK5HE-1Mcpg@mail.gmail.com> (raw)
In-Reply-To: <jwv7f5dhi3p.fsf-monnier+gmane.emacs.devel@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

On 29-Jan-2017 11:29 PM, "Stefan Monnier" <monnier@iro.umontreal.ca> wrote:

Hmm... why do that in gethash?  Why not just check NILP (obj->weak)
when purecopying?

The rationale for this was that weak tables wouldn't be purecopied, so it
might be a good idea to inform the user about that beforhand. The simple
NILP (obj->weak) check in purecopy is much easier and wouldn't generate
errors, I'll switch to that instead.

> Should this work, or is there anything else I need to do?

I think this should work.

Alright then, I'll push this to master after adding some more documentation.

> +make_pure_hash_table (struct Lisp_Hash_Table *table) {

Nitpick: I'd call it `purecopy_hash_table`.

Other functions in alloc.c that perform pure allocation for different
objects are named in the same way (make_pure_string, make_pure_vector), so
I merely followed this convention.

[-- Attachment #2: Type: text/html, Size: 1827 bytes --]

  reply	other threads:[~2017-01-29 19:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 18:37 [PATCH] Make purecopy create hash tables properly Vibhav Pant
2017-01-27 22:06 ` Paul Eggert
2017-01-27 23:10 ` Stefan Monnier
2017-01-28 10:25   ` Vibhav Pant
2017-01-28 10:26     ` Vibhav Pant
2017-01-28 14:58     ` Stefan Monnier
2017-01-28 20:06       ` Vibhav Pant
2017-01-29  2:18         ` Stefan Monnier
2017-01-29 17:23       ` Vibhav Pant
2017-01-29 17:58         ` Stefan Monnier
2017-01-29 19:14           ` Vibhav Pant [this message]
2017-01-29 19:41             ` Stefan Monnier
2017-01-30 12:43               ` Vibhav Pant

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=CA+T2Sh1+us8M6oE8Pih3E6MLFS40XPo4ge2yg5oeK5HE-1Mcpg@mail.gmail.com \
    --to=vibhavp@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).