aboutsummaryrefslogtreecommitdiffstats
path: root/src/composite.h
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2012-08-01 13:51:44 -0700
committerPaul Eggert <[email protected]>2012-08-01 13:51:44 -0700
commit4939150cb43137980c49b318bc70119b9d8ff6f7 (patch)
treebcee8eb23f3a6388789bd808a5539dae6e2fc854 /src/composite.h
parent947b2afddc9f54a999125aa7e8c9a705ecb51e18 (diff)
Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
This how ASET and AREF are supposed to work, and makes it easier to think about future improvements. See <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>. * charset.h (set_charset_attr): New function. All lvalue-style uses of CHARSET_DECODER etc. changed to use it. * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style. (aref_addr): New function. All uses of &AREF(...) changed. (set_hash_key, set_hash_value, set_hash_next, set_hash_hash) (set_hash_index): New functions. All lvalue-style uses of HASH_KEY etc. changed. * keyboard.c (set_prop): New function. All lvalue-style uses of PROP changed.
Diffstat (limited to 'src/composite.h')
-rw-r--r--src/composite.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/composite.h b/src/composite.h
index 845411f5cd..18edc66b1b 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -247,6 +247,11 @@ extern void compose_text (ptrdiff_t, ptrdiff_t, Lisp_Object, Lisp_Object,
#define LGSTRING_GLYPH_LEN(lgs) (ASIZE ((lgs)) - 2)
#define LGSTRING_GLYPH(lgs, idx) AREF ((lgs), (idx) + 2)
#define LGSTRING_SET_GLYPH(lgs, idx, val) ASET ((lgs), (idx) + 2, (val))
+static inline Lisp_Object *
+lgstring_glyph_addr (Lisp_Object lgs, ptrdiff_t idx)
+{
+ return aref_addr (lgs, idx + 2);
+}
/* Vector size of Lispy glyph. */
enum lglyph_indices