From fcf148759e42645a28fb17584a653ef99d22bb35 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 17 Oct 2012 17:37:55 +0200 Subject: [PATCH] Fix bug #12661 with w32 and cygw32 builds under --enable-check-lisp-object-type. src/cygw32.c (Fcygwin_convert_path_to_windows) (Fcygwin_convert_path_from_windows): Use EQ to compare 2 Lisp_Object values. src/w32fns.c (w32_msg_pump): Use XIL instead of casting an integer to Lisp_Object. --- src/ChangeLog | 9 +++++++++ src/cygw32.c | 4 ++-- src/w32fns.c | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b845eeb3ceb..3a6fb718e41 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2012-10-17 Eli Zaretskii + + * cygw32.c (Fcygwin_convert_path_to_windows) + (Fcygwin_convert_path_from_windows): Use EQ to compare 2 + Lisp_Object values. (Bug#12661) + + * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer + to Lisp_Object. (Bug#12661) + 2012-10-17 Kenichi Handa * xdisp.c (reseat_1): Make the information stored in it->cmp_it diff --git a/src/cygw32.c b/src/cygw32.c index c45a45648e9..8f63461da2a 100644 --- a/src/cygw32.c +++ b/src/cygw32.c @@ -145,7 +145,7 @@ DEFUN ("cygwin-convert-path-to-windows", (Lisp_Object path, Lisp_Object absolute_p) { return from_unicode ( - conv_filename_to_w32_unicode (path, absolute_p == Qnil ? 0 : 1)); + conv_filename_to_w32_unicode (path, EQ (absolute_p, Qnil) ? 0 : 1)); } DEFUN ("cygwin-convert-path-from-windows", @@ -156,7 +156,7 @@ DEFUN ("cygwin-convert-path-from-windows", (Lisp_Object path, Lisp_Object absolute_p) { return conv_filename_from_w32_unicode (to_unicode (path, &path), - absolute_p == Qnil ? 0 : 1); + EQ (absolute_p, Qnil) ? 0 : 1); } void diff --git a/src/w32fns.c b/src/w32fns.c index c5e4be4ffc9..8dd3eb83c60 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -2424,7 +2424,7 @@ w32_msg_pump (deferred_msg * msg_buf) thread-safe. The next line is okay because the cons cell is never made into garbage and is not relocated by GC. */ - XSETCAR ((Lisp_Object) ((EMACS_INT) msg.lParam), Qnil); + XSETCAR (XIL ((EMACS_INT) msg.lParam), Qnil); if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0)) emacs_abort (); break; @@ -2432,7 +2432,7 @@ w32_msg_pump (deferred_msg * msg_buf) { int vk_code = (int) msg.wParam; int cur_state = (GetKeyState (vk_code) & 1); - Lisp_Object new_state = (Lisp_Object) ((EMACS_INT) msg.lParam); + Lisp_Object new_state = XIL ((EMACS_INT) msg.lParam); /* NB: This code must be thread-safe. It is safe to call NILP because symbols are not relocated by GC, -- 2.39.2