# HG changeset patch # User Gerd Moellmann # Date 1015583192 0 # Node ID 412b8fa3fd955ae23c54b02dc76d7849f070b5c4 # Parent 6f750829ab0a403b7e1a6e16343139c766b20229 (SREF, SDATA, SCHARS, SBYTES, SMBP): New macros. diff -r 6f750829ab0a -r 412b8fa3fd95 src/lisp.h --- a/src/lisp.h Fri Mar 08 09:58:51 2002 +0000 +++ b/src/lisp.h Fri Mar 08 10:26:32 2002 +0000 @@ -1,5 +1,5 @@ /* Fundamental definitions for GNU Emacs Lisp interpreter. - Copyright (C) 1985,86,87,93,94,95,97,98,1999,2000, 2001 + Copyright (C) 1985,86,87,93,94,95,97,98,1999,2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -535,6 +535,14 @@ #define ASET(ARRAY, IDX, VAL) (AREF ((ARRAY), (IDX)) = (VAL)) #define ASIZE(ARRAY) XVECTOR ((ARRAY))->size +/* Convenience macros for dealing with Lisp strings. */ + +#define SREF(string, index) XSTRING (string)->data[index] +#define SDATA(string) XSTRING (string)->data +#define SCHARS(string) XSTRING (string)->size +#define SBYTES(string) XSTRING (string)->size_bytes +#define SMBP(string) STRING_MULTIBYTE (string) + /* Basic data type for use of intervals. See the macros in intervals.h. */