[Top][All Lists]

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

Re: [PATCH] src/process.c: remove unnecessary setters

From: Robert Cochran
Subject: Re: [PATCH] src/process.c: remove unnecessary setters
Date: Mon, 29 May 2017 18:40:21 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

> As I recall those setters and getters were put in for a reason. Have you
> consulted the development history and emacs-devel logs to see why, and/or
> contacted whoever added that code?

Not anymore, based on what I see.

With some git-blame history digging, here's what I found:

Dmitry Antipov added the ancestor PVAR macro in 3193acd2 "Use
INTERNAL_FIELD for processes." on 08/01/2012, and made the struct fields
use the INTERNAL_FIELD macro in the same commit.

This was split into two macros PGET and PSET in 21238f11 "Separate read
and write access to Lisp_Object slots of Lisp_Process." on 08/06/2012.

On 08/07/2012, he entirely drops PGET and removes the use of
INTERNAL_FIELD in 4d2b044c "Drop PGET and revert read access to
Lisp_Objects slots of Lisp_Process".

Then it was you that removed PSET in favor of individual setters in
6a09a33b "* process.h (PSET): Remove.", where the code has sat mostly
untouched since 08/18/2012 aside from being de-inlined by you in
b0ab8123d "Prefer plain 'static' to 'static inline'." on 09/30/2012.

Especially given that in 2015, INTERNAL_FIELD was removed (according to
ChangeLog.2 at any rate), it looks like the reason for the functions
removed to be abstracted away has long since become irrelevant.

I could be wrong though. I'm wrong a lot.

~Robert Cochran

GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26  AD2D E5C3 EB36 4886 8871

reply via email to

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