emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Kim F . Storm
Subject: [Emacs-diffs] Changes to emacs/src/charset.c
Date: Mon, 21 Jun 2004 17:55:18 -0400

Index: emacs/src/charset.c
diff -c emacs/src/charset.c:1.137 emacs/src/charset.c:1.138
*** emacs/src/charset.c:1.137   Mon May 10 17:51:27 2004
--- emacs/src/charset.c Mon Jun 21 21:52:46 2004
***************
*** 1645,1655 ****
       int n;
       Lisp_Object *args;
  {
!   int i;
!   unsigned char *buf = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH * n);
!   unsigned char *p = buf;
    int c;
    int multibyte = 0;
  
    for (i = 0; i < n; i++)
      {
--- 1645,1660 ----
       int n;
       Lisp_Object *args;
  {
!   int i, bufsize;
!   unsigned char *buf, *p;
    int c;
    int multibyte = 0;
+   Lisp_Object ret;
+   USE_SAFE_ALLOCA;
+ 
+   bufsize = MAX_MULTIBYTE_LENGTH * n;
+   SAFE_ALLOCA (buf, unsigned char *, bufsize);
+   p = buf;
  
    for (i = 0; i < n; i++)
      {
***************
*** 1667,1673 ****
        *p++ = c;
      }
  
!   return make_string_from_bytes (buf, n, p - buf);
  }
  
  #endif /* emacs */
--- 1672,1681 ----
        *p++ = c;
      }
  
!   ret = make_string_from_bytes (buf, n, p - buf);
!   SAFE_FREE (bufsize);
! 
!   return ret;
  }
  
  #endif /* emacs */




reply via email to

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