Commit 2e567bd3 authored by Ken Raeburn's avatar Ken Raeburn
Browse files

(Fstring_to_syntax, skip_chars): Treat Lisp string

contents as const.
parent dca0fc1c
......@@ -901,7 +901,7 @@ text property. */)
Lisp_Object string;
register unsigned char *p;
register const unsigned char *p;
register enum syntaxcode code;
int val;
Lisp_Object match;
......@@ -1365,7 +1365,7 @@ skip_chars (forwardp, syntaxp, string, lim)
int multibyte = !NILP (current_buffer->enable_multibyte_characters);
int string_multibyte;
int size_byte;
unsigned char *str;
const unsigned char *str;
int len;
CHECK_STRING (string);
......@@ -1386,10 +1386,11 @@ skip_chars (forwardp, syntaxp, string, lim)
nbytes = SCHARS (string);
if (nbytes != size_byte)
str = (unsigned char *) alloca (nbytes);
copy_text (SDATA (string), str, size_byte,
unsigned char *tmp = (unsigned char *) alloca (nbytes);
copy_text (SDATA (string), tmp, size_byte,
string_multibyte, multibyte);
size_byte = nbytes;
str = tmp;
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