* editfns.c (Fbyte_to_string): Signal an error if arg is not a byte.
This commit is contained in:
parent
3e99b8257b
commit
35f1de62f2
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2010-11-21 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* editfns.c (Fbyte_to_string): Signal an error arg is not a byte.
|
||||
|
||||
2010-11-20 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* gtkutil.c (menubar_map_cb): New function (Bug#7425).
|
||||
|
|
|
@ -222,12 +222,14 @@ usage: (char-to-string CHAR) */)
|
|||
}
|
||||
|
||||
DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0,
|
||||
doc: /* Convert arg BYTE to a string containing that byte. */)
|
||||
doc: /* Convert arg BYTE to a unibyte string containing that byte. */)
|
||||
(byte)
|
||||
Lisp_Object byte;
|
||||
{
|
||||
unsigned char b;
|
||||
CHECK_NUMBER (byte);
|
||||
if (XINT (byte) < 0 || XINT (byte) > 255)
|
||||
error ("Invalid byte");
|
||||
b = XINT (byte);
|
||||
return make_string_from_bytes (&b, 1, 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue