[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/data.c
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/data.c |
Date: |
Thu, 17 Apr 2003 21:23:23 -0400 |
Index: emacs/src/data.c
diff -c emacs/src/data.c:1.222 emacs/src/data.c:1.223
*** emacs/src/data.c:1.222 Wed Mar 26 10:23:10 2003
--- emacs/src/data.c Thu Apr 17 21:23:23 2003
***************
*** 2029,2041 ****
}
else if (STRING_MULTIBYTE (array))
{
! int idxval_byte, prev_bytes, new_bytes;
unsigned char workbuf[MAX_MULTIBYTE_LENGTH], *p0 = workbuf, *p1;
if (idxval < 0 || idxval >= SCHARS (array))
args_out_of_range (array, idx);
CHECK_NUMBER (newelt);
idxval_byte = string_char_to_byte (array, idxval);
p1 = SDATA (array) + idxval_byte;
PARSE_MULTIBYTE_SEQ (p1, nbytes - idxval_byte, prev_bytes);
--- 2029,2043 ----
}
else if (STRING_MULTIBYTE (array))
{
! int idxval_byte, prev_bytes, new_bytes, nbytes;
unsigned char workbuf[MAX_MULTIBYTE_LENGTH], *p0 = workbuf, *p1;
if (idxval < 0 || idxval >= SCHARS (array))
args_out_of_range (array, idx);
CHECK_NUMBER (newelt);
+ nbytes = SBYTES (array);
+
idxval_byte = string_char_to_byte (array, idxval);
p1 = SDATA (array) + idxval_byte;
PARSE_MULTIBYTE_SEQ (p1, nbytes - idxval_byte, prev_bytes);
***************
*** 2044,2050 ****
{
/* We must relocate the string data. */
int nchars = SCHARS (array);
- int nbytes = SBYTES (array);
unsigned char *str;
str = (nbytes <= MAX_ALLOCA
--- 2046,2051 ----