From: Eli Zaretskii Date: Thu, 18 Oct 2012 18:00:00 +0000 (+0200) Subject: Tested and fixed conversion of a descriptor (pointer) to event code. X-Git-Tag: emacs-24.3.90~173^2~7^2~660 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d884121be07ea5e47ad7c763d5370a6def7f9bd8;p=emacs.git Tested and fixed conversion of a descriptor (pointer) to event code. --- diff --git a/src/w32inevt.c b/src/w32inevt.c index 06629d37cf6..2cbf31efda3 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c @@ -624,7 +624,7 @@ handle_file_notifications (struct input_event *hold_quit) Lisp_Object action = lispy_file_action (fni->Action); inev.kind = FILE_NOTIFY_EVENT; - inev.code = (ptrdiff_t)notifications_desc; + inev.code = (ptrdiff_t)XINT (XIL ((EMACS_INT)notifications_desc)); inev.timestamp = GetTickCount (); inev.modifiers = 0; inev.frame_or_window = callback; diff --git a/src/w32notify.c b/src/w32notify.c index f14621001a8..9fcd15e7f8f 100644 --- a/src/w32notify.c +++ b/src/w32notify.c @@ -600,8 +600,9 @@ w32_get_watch_object (void *desc) { Lisp_Object descriptor = XIL ((EMACS_INT)desc); - /* This is called from the input queue handling code, so we cannot - possibly QUIT if watch_list is not in the right condition. */ + /* This is called from the input queue handling code, inside a + critical section, so we cannot possibly QUIT if watch_list is not + in the right condition. */ return NILP (watch_list) ? Qnil : assoc_no_quit (descriptor, watch_list); } diff --git a/src/w32term.c b/src/w32term.c index c00bbe0f3cd..3ebd849ec31 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -3305,7 +3305,8 @@ queue_notifications (struct input_event *event, W32Msg *msg, struct frame *f, Lisp_Object action = lispy_file_action (fni->Action); event->kind = FILE_NOTIFY_EVENT; - event->code = (ptrdiff_t)notifications_desc; + event->code + = (ptrdiff_t)XINT (XIL ((EMACS_INT)notifications_desc)); event->timestamp = msg->msg.time; event->modifiers = 0; event->frame_or_window = callback;