emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/data.c,v


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/data.c,v
Date: Thu, 17 Apr 2008 01:10:59 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   08/04/17 01:10:59

Index: data.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/data.c,v
retrieving revision 1.290
retrieving revision 1.291
diff -u -b -r1.290 -r1.291
--- data.c      26 Mar 2008 18:14:02 -0000      1.290
+++ data.c      17 Apr 2008 01:10:58 -0000      1.291
@@ -2093,7 +2093,17 @@
       CHECK_NUMBER (newelt);
 
       if (XINT (newelt) >= 0 && ! SINGLE_BYTE_CHAR_P (XINT (newelt)))
+       {
+         int i;
+
+         for (i = SBYTES (array) - 1; i >= 0; i--)
+           if (SREF (array, i) >= 0x80)
        args_out_of_range (array, newelt);
+         /* ARRAY is an ASCII string.  Convert it to a multibyte
+            string, and try `aset' again.  */
+         STRING_SET_MULTIBYTE (array);
+         return Faset (array, idx, newelt);
+       }
       SSET (array, idxval, XINT (newelt));
     }
 




reply via email to

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