From 2aff7c53068db3b7afcb9e66d8b5329f7d704dbb Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Fri, 22 Jan 2010 18:10:04 +0900 Subject: 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. --- src/alloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/alloc.c') diff --git a/src/alloc.c b/src/alloc.c index 3c48f8762f8..9a935cc8952 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4725,11 +4725,11 @@ check_pure_size () 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 @@ find_string_data_in_pure (data, nbytes) 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 @@ find_string_data_in_pure (data, nbytes) 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 @@ find_string_data_in_pure (data, nbytes) Lisp_Object make_pure_string (data, nchars, nbytes, multibyte) - char *data; + const char *data; int nchars, nbytes; int multibyte; { -- cgit v1.2.1