changeset 85242:9b00632ffdf2

(add_overlay_mod_hooklist): Use larger_vector.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 13 Oct 2007 12:06:04 +0000
parents af5773b20bd9
children 2869af9a0789
files src/buffer.c
diffstat 1 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Sat Oct 13 11:54:57 2007 +0000
+++ b/src/buffer.c	Sat Oct 13 12:06:04 2007 +0000
@@ -4217,15 +4217,8 @@
   int oldsize = XVECTOR (last_overlay_modification_hooks)->size;
 
   if (last_overlay_modification_hooks_used == oldsize)
-    {
-      Lisp_Object old;
-      old = last_overlay_modification_hooks;
-      last_overlay_modification_hooks
-	= Fmake_vector (make_number (oldsize * 2), Qnil);
-      bcopy (XVECTOR (old)->contents,
-	     XVECTOR (last_overlay_modification_hooks)->contents,
-	     sizeof (Lisp_Object) * oldsize);
-    }
+    last_overlay_modification_hooks = larger_vector 
+      (last_overlay_modification_hooks, oldsize * 2, Qnil);
   AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = functionlist;
   AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = overlay;
 }