emacs-devel
[Top][All Lists]
Advanced

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

Re: EVENT_INIT and obs. kbd_buffer_gcpro: 'arg' init still needed?


From: YAMAMOTO Mitsuharu
Subject: Re: EVENT_INIT and obs. kbd_buffer_gcpro: 'arg' init still needed?
Date: Thu, 01 Jun 2006 18:56:47 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Wed, 31 May 2006 09:50:35 -0400, Adrian Robert <address@hidden> said:

> One use of the termhooks.h EVENT_INIT() macro in macterm.c also takes  
> care to init the event's 'arg' to "Qnil", explaining with this comment:

>        /* It is necessary to set this (additional) argument slot of an
>        event to nil because keyboard.c protects incompletely
>        processed event from being garbage collected by placing them
>        in the kbd_buffer_gcpro vector.  */

> However, according to the ChangeLog this vector was removed on
> 2004-01-21 in response to changes on 2003-06-15, including the very
> introduction of the EVENT_INIT() macro.

I removed this comment that is referring to a nonexistent variable
from macterm.c.

> My question is, is the additional call to set 'arg' to "Qnil", found
> in w32, mac, and x terms, still needed?  I notice that macterm does
> not have it for other calls to EVENT_INIT.  Other terms only use
> EVENT_INIT once.

Although bzero'ed Lisp_Object corresponds to integer 0 and thus it
does not leads to a real problem, I think we should not rely on this.
So I added some code to set `arg' to Qnil in macterm.c.

                                     YAMAMOTO Mitsuharu
                                address@hidden




reply via email to

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