emacs-diffs
[Top][All Lists]
Advanced

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

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


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

Index: emacs/src/fns.c
diff -c emacs/src/fns.c:1.314.2.10 emacs/src/fns.c:1.314.2.11
*** emacs/src/fns.c:1.314.2.10  Tue May 11 02:37:58 2004
--- emacs/src/fns.c     Tue Jul  6 10:17:20 2004
***************
*** 1049,1064 ****
       Lisp_Object string;
  {
    unsigned char *buf;
  
    if (! STRING_MULTIBYTE (string))
      return string;
  
!   buf = (unsigned char *) alloca (SCHARS (string));
  
    copy_text (SDATA (string), buf, SBYTES (string),
             1, 0);
  
!   return make_unibyte_string (buf, SCHARS (string));
  }
  
  DEFUN ("string-make-multibyte", Fstring_make_multibyte, 
Sstring_make_multibyte,
--- 1049,1072 ----
       Lisp_Object string;
  {
    unsigned char *buf;
+   Lisp_Object ret;
  
    if (! STRING_MULTIBYTE (string))
      return string;
  
!   /* We can not use alloca here, because string might be very long.
!      For example when selecting megabytes of text and then pasting it to
!      another application.  */
!   buf = (unsigned char *) xmalloc (SCHARS (string));
  
    copy_text (SDATA (string), buf, SBYTES (string),
             1, 0);
  
!   ret = make_unibyte_string (buf, SCHARS (string));
! 
!   xfree (buf);
! 
!   return ret;
  }
  
  DEFUN ("string-make-multibyte", Fstring_make_multibyte, 
Sstring_make_multibyte,




reply via email to

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