mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 08:43:40 -07:00
* fringe.c (Fdefine_fringe_bitmap): Don't update size until alloc works.
This commit is contained in:
parent
2f64526875
commit
483a9e21b6
2 changed files with 10 additions and 5 deletions
|
|
@ -1,5 +1,7 @@
|
|||
2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* fringe.c (Fdefine_fringe_bitmap): Don't update size until alloc works.
|
||||
|
||||
* frame.h (struct frame): Use int, not EMACS_INT, where int works.
|
||||
This is for the members text_lines, text_cols, total_lines, total_cols,
|
||||
where the system imposes an 'int' limit.
|
||||
|
|
|
|||
13
src/fringe.c
13
src/fringe.c
|
|
@ -1610,22 +1610,25 @@ If BITMAP already exists, the existing definition is replaced. */)
|
|||
|
||||
if (n == max_fringe_bitmaps)
|
||||
{
|
||||
if ((max_fringe_bitmaps + 20) > MAX_FRINGE_BITMAPS)
|
||||
int bitmaps = max_fringe_bitmaps + 20;
|
||||
if (MAX_FRINGE_BITMAPS < bitmaps)
|
||||
error ("No free fringe bitmap slots");
|
||||
|
||||
i = max_fringe_bitmaps;
|
||||
max_fringe_bitmaps += 20;
|
||||
fringe_bitmaps
|
||||
= ((struct fringe_bitmap **)
|
||||
xrealloc (fringe_bitmaps, max_fringe_bitmaps * sizeof (struct fringe_bitmap *)));
|
||||
xrealloc (fringe_bitmaps, bitmaps * sizeof *fringe_bitmaps));
|
||||
fringe_faces
|
||||
= (Lisp_Object *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (Lisp_Object));
|
||||
= (Lisp_Object *) xrealloc (fringe_faces,
|
||||
bitmaps * sizeof *fringe_faces);
|
||||
|
||||
for (; i < max_fringe_bitmaps; i++)
|
||||
for (i = max_fringe_bitmaps; i < bitmaps; i++)
|
||||
{
|
||||
fringe_bitmaps[i] = NULL;
|
||||
fringe_faces[i] = Qnil;
|
||||
}
|
||||
|
||||
max_fringe_bitmaps = bitmaps;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue