From: Paul Eggert Date: Mon, 7 Feb 2011 04:48:38 +0000 (-0800) Subject: * lread.c: conform to C89 pointer rules X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~985 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4a25e32a7328908c9f49936f538cad568663ca86;p=emacs.git * lread.c: conform to C89 pointer rules --- diff --git a/src/ChangeLog b/src/ChangeLog index e1ef917a977..e4a3c63cb0b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -20,6 +20,7 @@ (string_make_unibyte, Fstring_as_unibyte, Fstring_to_unibyte): (Fbase64_encode_region, base64_encode_1, Fbase64_decode_region, Fmd5): Likewise. + * lread.c (read1, hash_string): Likewise. 2011-02-06 Paul Eggert diff --git a/src/lread.c b/src/lread.c index ca2f6cf04be..f638aba211b 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2771,7 +2771,8 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) ; else if (force_singlebyte) { - nchars = str_as_unibyte (read_buffer, p - read_buffer); + nchars = str_as_unibyte ((unsigned char *) read_buffer, + p - read_buffer); p = read_buffer + nchars; } else @@ -2841,7 +2842,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) } if (multibyte) - p += CHAR_STRING (c, p); + p += CHAR_STRING (c, (unsigned char *) p); else *p++ = c; c = READCHAR; @@ -2950,7 +2951,9 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) Lisp_Object name, result; EMACS_INT nbytes = p - read_buffer; EMACS_INT nchars - = (multibyte ? multibyte_chars_in_text (read_buffer, nbytes) + = (multibyte + ? multibyte_chars_in_text ((unsigned char *) read_buffer, + nbytes) : nbytes); if (uninterned_symbol && ! NILP (Vpurify_flag)) @@ -3442,7 +3445,7 @@ Lisp_Object initial_obarray; int oblookup_last_bucket_number; -static int hash_string (const unsigned char *ptr, int len); +static int hash_string (const char *ptr, int len); /* Get an error if OBARRAY is not an obarray. If it is one, return it. */ @@ -3700,10 +3703,10 @@ oblookup (Lisp_Object obarray, register const char *ptr, EMACS_INT size, EMACS_I } static int -hash_string (const unsigned char *ptr, int len) +hash_string (const char *ptr, int len) { - register const unsigned char *p = ptr; - register const unsigned char *end = p + len; + register const char *p = ptr; + register const char *end = p + len; register unsigned char c; register int hash = 0;