diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-01 13:51:44 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-01 13:51:44 -0700 |
commit | 4939150cb43137980c49b318bc70119b9d8ff6f7 (patch) | |
tree | bcee8eb23f3a6388789bd808a5539dae6e2fc854 /src/xfont.c | |
parent | 947b2afddc9f54a999125aa7e8c9a705ecb51e18 (diff) | |
download | emacs-4939150cb43137980c49b318bc70119b9d8ff6f7.tar.gz |
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/xfont.c')
-rw-r--r-- | src/xfont.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xfont.c b/src/xfont.c index 0443b49de8f..736c1161e27 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -463,11 +463,11 @@ xfont_list_pattern (Display *display, const char *pattern, list = Fcons (entity, list); continue; } - if (memcmp (props, &(AREF (entity, FONT_FOUNDRY_INDEX)), + if (memcmp (props, aref_addr (entity, FONT_FOUNDRY_INDEX), sizeof (Lisp_Object) * 7) || ! EQ (AREF (entity, FONT_SPACING_INDEX), props[7])) { - memcpy (props, &(AREF (entity, FONT_FOUNDRY_INDEX)), + memcpy (props, aref_addr (entity, FONT_FOUNDRY_INDEX), sizeof (Lisp_Object) * 7); props[7] = AREF (entity, FONT_SPACING_INDEX); scripts = xfont_supported_scripts (display, indices[i], |