diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-10-16 22:49:32 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-10-16 22:49:32 -0700 |
commit | 8c172e827b7e7ce537368bca665cfaa8c37f479d (patch) | |
tree | 9ad78cbd65440ed55cd2bf10614a85c3858c0f1c /src/fns.c | |
parent | 42dbaa0c43d5a6a1d03cdd046de448cf8a671015 (diff) | |
download | emacs-8c172e827b7e7ce537368bca665cfaa8c37f479d.tar.gz |
* fns.c (larger_vector): Rename locals for clarity.
Diffstat (limited to 'src/fns.c')
-rw-r--r-- | src/fns.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fns.c b/src/fns.c index 3d4de6ae691..2c9559f742b 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1184,6 +1184,7 @@ value is a new vector that contains the elements between index FROM if (!(0 <= from_char && from_char <= to_char && to_char <= size)) args_out_of_range_3 (string, make_number (from_char), make_number (to_char)); + if (STRINGP (string)) { ptrdiff_t to_byte = @@ -3430,15 +3431,15 @@ get_key_arg (Lisp_Object key, ptrdiff_t nargs, Lisp_Object *args, char *used) vector that are not copied from VEC are set to nil. */ Lisp_Object -larger_vector (Lisp_Object vec, ptrdiff_t incr_min, ptrdiff_t size_max) +larger_vector (Lisp_Object vec, ptrdiff_t incr_min, ptrdiff_t nitems_max) { struct Lisp_Vector *v; ptrdiff_t i, incr, incr_max, old_size, new_size; ptrdiff_t C_language_max = min (PTRDIFF_MAX, SIZE_MAX) / sizeof *v->contents; - ptrdiff_t n_max = (0 <= size_max && size_max < C_language_max - ? size_max : C_language_max); + ptrdiff_t n_max = (0 <= nitems_max && nitems_max < C_language_max + ? nitems_max : C_language_max); xassert (VECTORP (vec)); - xassert (0 < incr_min && -1 <= size_max); + xassert (0 < incr_min && -1 <= nitems_max); old_size = ASIZE (vec); incr_max = n_max - old_size; incr = max (incr_min, min (old_size >> 1, incr_max)); |