# HG changeset patch # User Ken Raeburn # Date 1027088844 0 # Node ID 35e66a0949b86e661bb301ced5669561305ffdfc # Parent fb13fafbd279c41c6527f7772d8ffc4ebd718dc4 (Fstring_to_syntax, skip_chars): Treat Lisp string contents as const. diff -r fb13fafbd279 -r 35e66a0949b8 src/syntax.c --- a/src/syntax.c Fri Jul 19 14:27:20 2002 +0000 +++ b/src/syntax.c Fri Jul 19 14:27:24 2002 +0000 @@ -901,7 +901,7 @@ (string) 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 @@ 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 @@ 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; } }