emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/casefiddle.c [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/casefiddle.c [lexbind]
Date: Tue, 06 Jul 2004 07:00:40 -0400

Index: emacs/src/casefiddle.c
diff -c emacs/src/casefiddle.c:1.40.4.4 emacs/src/casefiddle.c:1.40.4.5
*** emacs/src/casefiddle.c:1.40.4.4     Tue Jul  6 10:17:20 2004
--- emacs/src/casefiddle.c      Tue Jul  6 10:20:19 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;
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]