[Top][All Lists]

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

Re: [PATCH] Make purecopy create hash tables properly

From: Vibhav Pant
Subject: Re: [PATCH] Make purecopy create hash tables properly
Date: Mon, 30 Jan 2017 00:44:45 +0530

On 29-Jan-2017 11:29 PM, "Stefan Monnier" <address@hidden> 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. 

reply via email to

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