]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 18 Jul 2011 02:34:14 +0000 (22:34 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 18 Jul 2011 02:34:14 +0000 (22:34 -0400)
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
src/gnutls.c
src/process.h
src/xdisp.c

index c06c98c54185b8e5ef54a35560164efd4c03bf9e..a2891fa9c911bfafc283bfa42f1d24a2a47a1a55 100644 (file)
@@ -1,3 +1,11 @@
+2011-07-18  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * 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  <schwab@linux-m68k.org>
 
        * lread.c (read_integer): Unread even EOF character.
index 52e80a69ae539c164471e83d1ce4b0c8555e7a0e..3175f55041d35efa2db37369b3aee59429d9e716 100644 (file)
@@ -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 */
index 4866a8c1022cdd30438e6c08d6250606fcb00b68..aff9e970f63813edfce00fc475387b30c315933b 100644 (file)
@@ -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.  */
index 50da62ca0ab3a0a3c730c88ffb115d9e79e7ef25..72a246ca0c382a441ac5311055f610d7bef89f24 100644 (file)
@@ -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