Commit 2aff7c53 authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu

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.
parent 74327f7a
2010-01-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* 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.
2010-01-22 Eli Zaretskii <eliz@gnu.org>
* lread.c (Fload): Don't treat files without .elc extension as
......
......@@ -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;
{
......
......@@ -2686,7 +2686,7 @@ extern Lisp_Object make_uninit_multibyte_string P_ ((int, int));
extern Lisp_Object make_string_from_bytes P_ ((const char *, int, int));
extern Lisp_Object make_specified_string P_ ((const char *, int, int, int));
EXFUN (Fpurecopy, 1);
extern Lisp_Object make_pure_string P_ ((char *, int, int, int));
extern Lisp_Object make_pure_string P_ ((const char *, int, int, int));
extern Lisp_Object make_pure_c_string (const char *data);
extern Lisp_Object pure_cons P_ ((Lisp_Object, Lisp_Object));
extern Lisp_Object make_pure_vector P_ ((EMACS_INT));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment