changeset 35998:5cf8398ba424

(Fchar_to_string): If CHARACTER is less than 256, return a unibyte string.
author Kenichi Handa <handa@m17n.org>
date Fri, 09 Feb 2001 05:32:46 +0000
parents d04b544d2a18
children 6b1e74f1fcce
files src/editfns.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Fri Feb 09 05:32:24 2001 +0000
+++ b/src/editfns.c	Fri Feb 09 05:32:46 2001 +0000
@@ -167,7 +167,9 @@
 
   CHECK_NUMBER (character, 0);
 
-  len = CHAR_STRING (XFASTINT (character), str);
+  len = (SINGLE_BYTE_CHAR_P (XFASTINT (character))
+	 ? (*str = (unsigned char)(XFASTINT (character)), 1)
+	 : char_to_string (XFASTINT (character), str));
   return make_string_from_bytes (str, 1, len);
 }