]> code.delx.au - gnu-emacs/blobdiff - src/data.c
Prefer ptrdiff_t to int and avoid integer overflows.
[gnu-emacs] / src / data.c
index 4ef81f2474e31364e679c145a145b8411f503255..f02b4588ad0af951cf03028059d023347b20a6e6 100644 (file)
@@ -1241,10 +1241,10 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where,
 
            /* Find the new binding.  */
            XSETSYMBOL (symbol, sym); /* May have changed via aliasing.  */
-           tem1 = Fassq (symbol,
-                         (blv->frame_local
-                          ? XFRAME (where)->param_alist
-                          : BVAR (XBUFFER (where), local_var_alist)));
+           tem1 = assq_no_quit (symbol,
+                                (blv->frame_local
+                                 ? XFRAME (where)->param_alist
+                                 : BVAR (XBUFFER (where), local_var_alist)));
            set_blv_where (blv, where);
            blv->found = 1;
 
@@ -2248,7 +2248,7 @@ bool-vector.  IDX starts at 0.  */)
        {
          if (! SINGLE_BYTE_CHAR_P (c))
            {
-             int i;
+             ptrdiff_t i;
 
              for (i = SBYTES (array) - 1; i >= 0; i--)
                if (SREF (array, i) >= 0x80)
@@ -2342,7 +2342,7 @@ usage: (= NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)  */)
 }
 
 DEFUN ("<", Flss, Slss, 1, MANY, 0,
-       doc: /* Return t if each arg is less than the next arg.  All must be numbers or markers.
+       doc: /* Return t if each arg (a number or marker), is less than the next arg.
 usage: (< NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
@@ -2350,7 +2350,7 @@ usage: (< NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)  */)
 }
 
 DEFUN (">", Fgtr, Sgtr, 1, MANY, 0,
-       doc: /* Return t if each arg is greater than the next arg.  All must be numbers or markers.
+       doc: /* Return t if each arg (a number or marker) is greater than the next arg.
 usage: (> NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
@@ -2358,8 +2358,7 @@ usage: (> NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)  */)
 }
 
 DEFUN ("<=", Fleq, Sleq, 1, MANY, 0,
-       doc: /* Return t if each arg is less than or equal to the next arg.
-All must be numbers or markers.
+       doc: /* Return t if each arg (a number or marker) is less than or equal to the next.
 usage: (<= NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
@@ -2367,8 +2366,7 @@ usage: (<= NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)  */)
 }
 
 DEFUN (">=", Fgeq, Sgeq, 1, MANY, 0,
-       doc: /* Return t if each arg is greater than or equal to the next arg.
-All must be numbers or markers.
+       doc: /* Return t if each arg (a number or marker) is greater than or equal to the next.
 usage: (>= NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
@@ -2982,7 +2980,7 @@ bool_vector_spare_mask (EMACS_INT nr_bits)
 /* Info about unsigned long long, falling back on unsigned long
    if unsigned long long is not available.  */
 
-#if HAVE_UNSIGNED_LONG_LONG_INT
+#if HAVE_UNSIGNED_LONG_LONG_INT && defined ULLONG_MAX
 enum { BITS_PER_ULL = CHAR_BIT * sizeof (unsigned long long) };
 # define ULL_MAX ULLONG_MAX
 #else