mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-13 15:00:42 -08:00
(Fstring_to_char): Use string macros instead of Lisp_String fields.
This commit is contained in:
parent
9f5348e3c8
commit
4e491f8d1e
1 changed files with 3 additions and 5 deletions
|
|
@ -194,15 +194,13 @@ A multibyte character is handled correctly. */)
|
|||
register Lisp_Object string;
|
||||
{
|
||||
register Lisp_Object val;
|
||||
register struct Lisp_String *p;
|
||||
CHECK_STRING (string);
|
||||
p = XSTRING (string);
|
||||
if (p->size)
|
||||
if (SCHARS (string))
|
||||
{
|
||||
if (STRING_MULTIBYTE (string))
|
||||
XSETFASTINT (val, STRING_CHAR (p->data, STRING_BYTES (p)));
|
||||
XSETFASTINT (val, STRING_CHAR (SDATA (string), SBYTES (string)));
|
||||
else
|
||||
XSETFASTINT (val, p->data[0]);
|
||||
XSETFASTINT (val, SREF (string, 0));
|
||||
}
|
||||
else
|
||||
XSETFASTINT (val, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue