Mercurial > emacs
diff src/alloc.c @ 106950:ddd257e3f816
Make string pointer args point to const as in other string allocation functions.
* lisp.h (make_pure_string): String pointer arg now points to const.
* alloc.c (find_string_data_in_pure, make_pure_string): String pointer
args now point to const.
| author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
|---|---|
| date | Fri, 22 Jan 2010 18:10:04 +0900 |
| parents | 1d1d5d9bd884 |
| children | 3447e262f426 d14945d39811 |
line wrap: on
line diff
--- a/src/alloc.c Fri Jan 22 10:44:50 2010 +0200 +++ b/src/alloc.c Fri Jan 22 18:10:04 2010 +0900 @@ -4725,11 +4725,11 @@ static char * find_string_data_in_pure (data, nbytes) - char *data; + const char *data; int nbytes; { int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max; - unsigned char *p; + const unsigned char *p; char *non_lisp_beg; if (pure_bytes_used_non_lisp < nbytes + 1) @@ -4740,7 +4740,7 @@ for (i = 0; i < 256; i++) bm_skip[i] = skip; - p = (unsigned char *) data; + p = (const unsigned char *) data; while (--skip > 0) bm_skip[*p++] = skip; @@ -4754,7 +4754,7 @@ infinity = pure_bytes_used_non_lisp + 1; bm_skip['\0'] = infinity; - p = (unsigned char *) non_lisp_beg + nbytes; + p = (const unsigned char *) non_lisp_beg + nbytes; start = 0; do { @@ -4796,7 +4796,7 @@ Lisp_Object make_pure_string (data, nchars, nbytes, multibyte) - char *data; + const char *data; int nchars, nbytes; int multibyte; {
