summaryrefslogtreecommitdiff
path: root/src/process.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-11-16 05:03:02 +0000
committerKarl Heuer <kwzh@gnu.org>1994-11-16 05:03:02 +0000
commit23d6bb9cd84ed2bfa80b15707cdb771faae165b2 (patch)
tree1383abf6139110a8192fc2f4fe8e8b0903a8f390 /src/process.c
parent1825c68d0c522e82968bccb90d34f3f525946ba2 (diff)
downloademacs-23d6bb9cd84ed2bfa80b15707cdb771faae165b2.tar.gz
(make_process): Use allocate_vectorlike and VECSIZE.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/process.c b/src/process.c
index dd830fdb83a..db4b31ad57c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -467,22 +467,18 @@ Lisp_Object
make_process (name)
Lisp_Object name;
{
+ struct Lisp_Vector *vec;
register Lisp_Object val, tem, name1;
register struct Lisp_Process *p;
char suffix[10];
register int i;
- /* size of process structure includes the vector header,
- so deduct for that. But struct Lisp_Vector includes the first
- element, thus deducts too much, so add it back. */
- val = Fmake_vector (make_number ((sizeof (struct Lisp_Process)
- - sizeof (struct Lisp_Vector)
- + sizeof (Lisp_Object))
- / sizeof (Lisp_Object)),
- Qnil);
- XSETTYPE (val, Lisp_Process);
-
- p = XPROCESS (val);
+ vec = allocate_vectorlike ((EMACS_INT) VECSIZE (struct Lisp_Process));
+ for (i = 0; i < VECSIZE (struct Lisp_Process); i++)
+ vec->contents[i] = Qnil;
+ vec->size = VECSIZE (struct Lisp_Process);
+ p = (struct Lisp_Process *)vec;
+
XSETINT (p->infd, -1);
XSETINT (p->outfd, -1);
XSETFASTINT (p->pid, 0);
@@ -505,6 +501,7 @@ make_process (name)
}
name = name1;
p->name = name;
+ XSETPROCESS (val, p);
Vprocess_alist = Fcons (Fcons (name, val), Vprocess_alist);
return val;
}