aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2013-07-30 17:40:46 +0400
committerDmitry Antipov2013-07-30 17:40:46 +0400
commitbee6a2c7dcc15d14961b2bc164ea91dfa178042d (patch)
tree7a675937fb58ceb26940ded984b72da8b7cbd615 /src
parent39e8fb76d691d27b0aa8038216488d78f66121b7 (diff)
downloademacs-bee6a2c7dcc15d14961b2bc164ea91dfa178042d.tar.gz
emacs-bee6a2c7dcc15d14961b2bc164ea91dfa178042d.zip
* xfaces.c (make_face_cache): For struct face_cache, prefer
xmalloc to xzalloc and so avoid redundant call to memset. (Finternal_set_lisp_face_attribute): Fix comment typo and style.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xfaces.c15
2 files changed, 12 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 79fce55c003..bfe4dfaf39a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
12013-07-30 Dmitry Antipov <dmantipov@yandex.ru> 12013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 * xfaces.c (make_face_cache): For struct face_cache, prefer
4 xmalloc to xzalloc and so avoid redundant call to memset.
5 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
6
72013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
8
3 * fringe.c (draw_window_fringes, update_window_fringes) 9 * fringe.c (draw_window_fringes, update_window_fringes)
4 (compute_fringe_widths): 10 (compute_fringe_widths):
5 * w32term.c (x_draw_glyph_string): 11 * w32term.c (x_draw_glyph_string):
diff --git a/src/xfaces.c b/src/xfaces.c
index 7bf05fc85cd..52cd65c029f 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3247,10 +3247,9 @@ FRAME 0 means change the face on all frames, and change the default
3247#endif /* HAVE_WINDOW_SYSTEM */ 3247#endif /* HAVE_WINDOW_SYSTEM */
3248 else if (EQ (face, Qmenu)) 3248 else if (EQ (face, Qmenu))
3249 { 3249 {
3250 /* Indicate that we have to update the menu bar when 3250 /* Indicate that we have to update the menu bar when realizing
3251 realizing faces on FRAME. FRAME t change the 3251 faces on FRAME. FRAME t change the default for new frames.
3252 default for new frames. We do this by setting 3252 We do this by setting the flag in new face caches. */
3253 setting the flag in new face caches */
3254 if (FRAMEP (frame)) 3253 if (FRAMEP (frame))
3255 { 3254 {
3256 struct frame *f = XFRAME (frame); 3255 struct frame *f = XFRAME (frame);
@@ -4167,13 +4166,11 @@ If FRAME is unspecified or nil, the current frame is used. */)
4167static struct face_cache * 4166static struct face_cache *
4168make_face_cache (struct frame *f) 4167make_face_cache (struct frame *f)
4169{ 4168{
4170 struct face_cache *c; 4169 struct face_cache *c = xmalloc (sizeof *c);
4171 int size;
4172 4170
4173 c = xzalloc (sizeof *c); 4171 c->buckets = xzalloc (FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets);
4174 size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
4175 c->buckets = xzalloc (size);
4176 c->size = 50; 4172 c->size = 50;
4173 c->used = 0;
4177 c->faces_by_id = xmalloc (c->size * sizeof *c->faces_by_id); 4174 c->faces_by_id = xmalloc (c->size * sizeof *c->faces_by_id);
4178 c->f = f; 4175 c->f = f;
4179 c->menu_face_changed_p = menu_face_changed_default; 4176 c->menu_face_changed_p = menu_face_changed_default;