aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
467make_process (name) 467make_process (name)
468 Lisp_Object name; 468 Lisp_Object name;
469{ 469{
470 struct Lisp_Vector *vec;
470 register Lisp_Object val, tem, name1; 471 register Lisp_Object val, tem, name1;
471 register struct Lisp_Process *p; 472 register struct Lisp_Process *p;
472 char suffix[10]; 473 char suffix[10];
473 register int i; 474 register int i;
474 475
475 /* size of process structure includes the vector header, 476 vec = allocate_vectorlike ((EMACS_INT) VECSIZE (struct Lisp_Process));
476 so deduct for that. But struct Lisp_Vector includes the first 477 for (i = 0; i < VECSIZE (struct Lisp_Process); i++)
477 element, thus deducts too much, so add it back. */ 478 vec->contents[i] = Qnil;
478 val = Fmake_vector (make_number ((sizeof (struct Lisp_Process) 479 vec->size = VECSIZE (struct Lisp_Process);
479 - sizeof (struct Lisp_Vector) 480 p = (struct Lisp_Process *)vec;
480 + sizeof (Lisp_Object)) 481
481 / sizeof (Lisp_Object)),
482 Qnil);
483 XSETTYPE (val, Lisp_Process);
484
485 p = XPROCESS (val);
486 XSETINT (p->infd, -1); 482 XSETINT (p->infd, -1);
487 XSETINT (p->outfd, -1); 483 XSETINT (p->outfd, -1);
488 XSETFASTINT (p->pid, 0); 484 XSETFASTINT (p->pid, 0);
@@ -505,6 +501,7 @@ make_process (name)
505 } 501 }
506 name = name1; 502 name = name1;
507 p->name = name; 503 p->name = name;
504 XSETPROCESS (val, p);
508 Vprocess_alist = Fcons (Fcons (name, val), Vprocess_alist); 505 Vprocess_alist = Fcons (Fcons (name, val), Vprocess_alist);
509 return val; 506 return val;
510} 507}