diff options
| author | YAMAMOTO Mitsuharu | 2010-01-22 18:10:04 +0900 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2010-01-22 18:10:04 +0900 |
| commit | 2aff7c53068db3b7afcb9e66d8b5329f7d704dbb (patch) | |
| tree | 26847307a853d50f4d1084bac01fe41ae24f270e /src/alloc.c | |
| parent | 74327f7a7c4f8fb1ea4bacd8147ac5b1169231c3 (diff) | |
| download | emacs-2aff7c53068db3b7afcb9e66d8b5329f7d704dbb.tar.gz emacs-2aff7c53068db3b7afcb9e66d8b5329f7d704dbb.zip | |
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.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 () | |||
| 4725 | 4725 | ||
| 4726 | static char * | 4726 | static char * |
| 4727 | find_string_data_in_pure (data, nbytes) | 4727 | find_string_data_in_pure (data, nbytes) |
| 4728 | char *data; | 4728 | const char *data; |
| 4729 | int nbytes; | 4729 | int nbytes; |
| 4730 | { | 4730 | { |
| 4731 | int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max; | 4731 | int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max; |
| 4732 | unsigned char *p; | 4732 | const unsigned char *p; |
| 4733 | char *non_lisp_beg; | 4733 | char *non_lisp_beg; |
| 4734 | 4734 | ||
| 4735 | if (pure_bytes_used_non_lisp < nbytes + 1) | 4735 | if (pure_bytes_used_non_lisp < nbytes + 1) |
| @@ -4740,7 +4740,7 @@ find_string_data_in_pure (data, nbytes) | |||
| 4740 | for (i = 0; i < 256; i++) | 4740 | for (i = 0; i < 256; i++) |
| 4741 | bm_skip[i] = skip; | 4741 | bm_skip[i] = skip; |
| 4742 | 4742 | ||
| 4743 | p = (unsigned char *) data; | 4743 | p = (const unsigned char *) data; |
| 4744 | while (--skip > 0) | 4744 | while (--skip > 0) |
| 4745 | bm_skip[*p++] = skip; | 4745 | bm_skip[*p++] = skip; |
| 4746 | 4746 | ||
| @@ -4754,7 +4754,7 @@ find_string_data_in_pure (data, nbytes) | |||
| 4754 | infinity = pure_bytes_used_non_lisp + 1; | 4754 | infinity = pure_bytes_used_non_lisp + 1; |
| 4755 | bm_skip['\0'] = infinity; | 4755 | bm_skip['\0'] = infinity; |
| 4756 | 4756 | ||
| 4757 | p = (unsigned char *) non_lisp_beg + nbytes; | 4757 | p = (const unsigned char *) non_lisp_beg + nbytes; |
| 4758 | start = 0; | 4758 | start = 0; |
| 4759 | do | 4759 | do |
| 4760 | { | 4760 | { |
| @@ -4796,7 +4796,7 @@ find_string_data_in_pure (data, nbytes) | |||
| 4796 | 4796 | ||
| 4797 | Lisp_Object | 4797 | Lisp_Object |
| 4798 | make_pure_string (data, nchars, nbytes, multibyte) | 4798 | make_pure_string (data, nchars, nbytes, multibyte) |
| 4799 | char *data; | 4799 | const char *data; |
| 4800 | int nchars, nbytes; | 4800 | int nchars, nbytes; |
| 4801 | int multibyte; | 4801 | int multibyte; |
| 4802 | { | 4802 | { |