changeset 9972:92b33538b36a

(make_frame): Use allocate_vectorlike and VECSIZE.
author Karl Heuer <kwzh@gnu.org>
date Wed, 16 Nov 1994 05:50:06 +0000
parents 214a00665c2b
children 1d5a908f201e
files src/frame.c
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Wed Nov 16 05:17:32 1994 +0000
+++ b/src/frame.c	Wed Nov 16 05:50:06 1994 +0000
@@ -141,13 +141,15 @@
   register struct frame *f;
   register Lisp_Object root_window;
   register Lisp_Object mini_window;
+  register struct Lisp_Vector *vec;
+  int i;
 
-  frame = Fmake_vector (((sizeof (struct frame) - (sizeof (Lisp_Vector)
-						     - sizeof (Lisp_Object)))
-			  / sizeof (Lisp_Object)),
-			 make_number (0));
-  XSETTYPE (frame, Lisp_Frame);
-  f = XFRAME (frame);
+  vec = allocate_vectorlike ((EMACS_INT) VECSIZE (struct frame));
+  for (i = 0; i < VECSIZE (struct frame); i++)
+    XSETFASTINT (vec->contents[i], 0);
+  vec->size = VECSIZE (struct frame);
+  f = (struct frame *)vec;
+  XSETFRAME (frame, f);
 
   f->cursor_x = 0;
   f->cursor_y = 0;