Mercurial > emacs
changeset 46443:b612fecce4cc
(Fstring_to_char): Use string macros instead of Lisp_String fields.
author | Ken Raeburn <raeburn@raeburn.org> |
---|---|
date | Tue, 16 Jul 2002 16:58:04 +0000 |
parents | 920285978b39 |
children | c7158c721fef |
files | src/editfns.c |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/editfns.c Tue Jul 16 16:37:40 2002 +0000 +++ b/src/editfns.c Tue Jul 16 16:58:04 2002 +0000 @@ -194,15 +194,13 @@ 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);