emacs-devel
[Top][All Lists]
Advanced

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

Re: master ecdbf82cb9: Fix leaks of XImage structures in image.c


From: Po Lu
Subject: Re: master ecdbf82cb9: Fix leaks of XImage structures in image.c
Date: Tue, 01 Nov 2022 16:33:16 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Kangas <stefankangas@gmail.com> writes:

> Why not just keep the initialization where it was?

Because it's IME hard to read.  See the beginning of handle_one_xevent
for why declarators with initialization tend to be confusing.

> I thought we preferred slowly moving to the C99 style over time.  This
> change goes in the opposite direction.

That does not affect "ANSI-style" or "C99-style"; declarations with
initializers are still valid ANSI, they just have to be at the start of
a block:

int
foo (struct thing_dereferenced_often *item)
{
  register struct thing_dereferenced_often *reg_item = item;

  /* Code that proceeds to dereference reg_item a lot... finally
     producing: */
  if (bar)
    {
      register crayon *mumble = bar;
      /* etc... */
    }

  return reg_item->t_flags & T_ALLFLAGS;
}



reply via email to

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