[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/casefiddle.c
From: |
Kim F . Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/casefiddle.c |
Date: |
Mon, 21 Jun 2004 17:55:26 -0400 |
Index: emacs/src/casefiddle.c
diff -c emacs/src/casefiddle.c:1.46 emacs/src/casefiddle.c:1.47
*** emacs/src/casefiddle.c:1.46 Wed Jun 16 15:02:41 2004
--- emacs/src/casefiddle.c Mon Jun 21 21:52:03 2004
***************
*** 110,117 ****
/* The work is not yet finished because of a multibyte
character just encountered. */
int fromlen, j_byte = i;
! char *buf
! = (char *) alloca ((len - i) * MAX_MULTIBYTE_LENGTH + i);
/* Copy data already handled. */
bcopy (SDATA (obj), buf, i);
--- 110,121 ----
/* The work is not yet finished because of a multibyte
character just encountered. */
int fromlen, j_byte = i;
! char *buf;
! int bufsize;
! USE_SAFE_ALLOCA;
!
! bufsize = (len - i) * MAX_MULTIBYTE_LENGTH + i;
! SAFE_ALLOCA (buf, char *, bufsize);
/* Copy data already handled. */
bcopy (SDATA (obj), buf, i);
***************
*** 133,138 ****
--- 137,143 ----
}
obj = make_multibyte_string (buf, SCHARS (obj),
j_byte);
+ SAFE_FREE (bufsize);
}
return obj;
}