/[emacs]/emacs/src/fns.c
ViewVC logotype

Diff of /emacs/src/fns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.314.2.10 by miles, Tue May 11 02:37:58 2004 UTC revision 1.314.2.11 by miles, Tue Jul 6 10:17:20 2004 UTC
# Line 1049  string_make_unibyte (string) Line 1049  string_make_unibyte (string)
1049       Lisp_Object string;       Lisp_Object string;
1050  {  {
1051    unsigned char *buf;    unsigned char *buf;
1052      Lisp_Object ret;
1053    
1054    if (! STRING_MULTIBYTE (string))    if (! STRING_MULTIBYTE (string))
1055      return string;      return string;
1056    
1057    buf = (unsigned char *) alloca (SCHARS (string));    /* We can not use alloca here, because string might be very long.
1058         For example when selecting megabytes of text and then pasting it to
1059         another application.  */
1060      buf = (unsigned char *) xmalloc (SCHARS (string));
1061    
1062    copy_text (SDATA (string), buf, SBYTES (string),    copy_text (SDATA (string), buf, SBYTES (string),
1063               1, 0);               1, 0);
1064    
1065    return make_unibyte_string (buf, SCHARS (string));    ret = make_unibyte_string (buf, SCHARS (string));
1066    
1067      xfree (buf);
1068    
1069      return ret;
1070  }  }
1071    
1072  DEFUN ("string-make-multibyte", Fstring_make_multibyte, Sstring_make_multibyte,  DEFUN ("string-make-multibyte", Fstring_make_multibyte, Sstring_make_multibyte,

Legend:
Removed from v.1.314.2.10  
changed lines
  Added in v.1.314.2.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26