From 925a6be733dc81bd5295680b9c10e3a373d5f9b8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 17 Jul 2011 22:34:14 -0400 Subject: [PATCH] * src/xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ to compare Lisp_Objects. * src/gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to global_gnutls_log_level, don't mistake it for a Lisp_Object. (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses. --- src/ChangeLog | 8 ++++++++ src/gnutls.c | 12 +++++------- src/process.h | 2 +- src/xdisp.c | 4 ++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c06c98c541..a2891fa9c9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2011-07-18 Stefan Monnier + + * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ + to compare Lisp_Objects. + * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to + global_gnutls_log_level, don't mistake it for a Lisp_Object. + (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses. + 2011-07-17 Andreas Schwab * lread.c (read_integer): Unread even EOF character. diff --git a/src/gnutls.c b/src/gnutls.c index 52e80a69ae..3175f55041 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -193,8 +193,7 @@ init_gnutls_functions (Lisp_Object libraries) LOAD_GNUTLS_FN (library, gnutls_x509_crt_import); LOAD_GNUTLS_FN (library, gnutls_x509_crt_init); - if (NUMBERP (Vgnutls_log_level)) - max_log_level = XINT (Vgnutls_log_level); + max_log_level = global_gnutls_log_level; GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:", SDATA (Fget (Qgnutls_dll, QCloaded_from))); @@ -406,8 +405,7 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err) if (err >= 0) return 0; - if (NUMBERP (Vgnutls_log_level)) - max_log_level = XINT (Vgnutls_log_level); + max_log_level = global_gnutls_log_level; /* TODO: use gnutls-error-fatalp and gnutls-error-string. */ @@ -1155,9 +1153,9 @@ syms_of_gnutls (void) defsubr (&Sgnutls_bye); defsubr (&Sgnutls_available_p); - DEFVAR_INT ("gnutls-log-level", Vgnutls_log_level, - doc: /* Logging level used by the GnuTLS functions. */); - Vgnutls_log_level = make_number (0); + DEFVAR_INT ("gnutls-log-level", global_gnutls_log_level, + doc: /* Logging level used by the GnuTLS functions. */); + global_gnutls_log_level = 0; } #endif /* HAVE_GNUTLS */ diff --git a/src/process.h b/src/process.h index 4866a8c102..aff9e970f6 100644 --- a/src/process.h +++ b/src/process.h @@ -141,7 +141,7 @@ struct Lisp_Process /* Every field in the preceding structure except for the first two must be a Lisp_Object, for GC's sake. */ -#define ChannelMask(n) (1<<(n)) +#define ChannelMask(n) (1 << (n)) /* True if we are about to fork off a synchronous process or if we are waiting for it. */ diff --git a/src/xdisp.c b/src/xdisp.c index 50da62ca0a..72a246ca0c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -6945,7 +6945,7 @@ next_element_from_string (struct it *it) struct text_pos position; xassert (STRINGP (it->string)); - xassert (!it->bidi_p || it->string == it->bidi_it.string.lstring); + xassert (!it->bidi_p || EQ (it->string, it->bidi_it.string.lstring)); xassert (IT_STRING_CHARPOS (*it) >= 0); position = it->current.string_pos; @@ -7259,7 +7259,7 @@ next_element_from_buffer (struct it *it) xassert (IT_CHARPOS (*it) >= BEGV); xassert (NILP (it->string) && !it->s); xassert (!it->bidi_p - || (it->bidi_it.string.lstring == Qnil + || (EQ (it->bidi_it.string.lstring, Qnil) && it->bidi_it.string.s == NULL)); /* With bidi reordering, the character to display might not be the -- 2.20.1