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 [lexbind]


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

Index: emacs/src/charset.c
diff -c emacs/src/charset.c:1.129.2.4 emacs/src/charset.c:1.129.2.5
*** emacs/src/charset.c:1.129.2.4       Tue May 11 02:37:22 2004
--- emacs/src/charset.c Tue Jul  6 10:20:20 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]