emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] src/eval.c (Fapply): Remove unnecessary goto


From: Lee Duhem
Subject: Re: [PATCH] src/eval.c (Fapply): Remove unnecessary goto
Date: Fri, 5 Dec 2014 16:17:00 +0800

Hi Stefan,

Thank you for your comments.

On Fri, Dec 5, 2014 at 3:18 AM, Stefan Monnier <address@hidden> wrote:
>
> Oops, indeed.  Installed in emacs-24.

Why do not change the master branch?

Let me guess. Because this is a bug fix, so it should come to
current release branch, aka emacs-24, and master branch will
get this change when emacs-24 is merged to it. Am I correct?

>
>> + * eval.c (Fapply): Remove unnecessary goto.
>
> Yes, that function was poorly structured.  I had some restructuring in
> my local tree as well for a long time, so I took advantage of your patch
> to do a more thorough job (installed in master).
>
>> -      if (numargs < XSUBR (fun)->min_args
>> -  || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs))
>> - goto funcall; /* Let funcall get the error.  */
>> -      else if (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args > 
>> numargs)
>> +      if (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args > numargs)
>
> This is actually not quite right:

Now I see. I missed a possible error condition.

>
>> + * eval.c(Fbacktrace): Avoid unnecessary strlen calls.
>
> I'm ambivalent on this one: printing the backtrace really shouldn't be
> performance sensitive, and using -1 makes it easier to change the code.

Good point.

Sincerely,
lee



reply via email to

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