make_lisp_proc bug
authorRobin Templeton <robin@terpri.org>
Sun, 7 Dec 2014 22:59:28 +0000 (17:59 -0500)
committerRobin Templeton <robin@terpri.org>
Mon, 9 Feb 2015 18:04:27 +0000 (13:04 -0500)
* src/lisp.h (make_lisp_proc): Return the `self' object from the
  structure header. This prevents the allocation of distinct objects
  representing the same process. Thanks to Matt Kramer
  <matt314159@gmail.com> for the report.

src/lisp.h

index 5d8956e..7d9951b 100644 (file)
@@ -706,18 +706,13 @@ XBOOL_VECTOR (Lisp_Object a)
   return SMOB_PTR (a);
 }
 
-INLINE Lisp_Object
-make_lisp_proc (struct Lisp_Process *p)
-{
-  return scm_new_smob (lisp_vectorlike_tag, (scm_t_bits) p);
-}
-
 #define XSETINT(a, b) ((a) = make_number (b))
 #define XSETFASTINT(a, b) ((a) = make_natnum (b))
 #define XSETVECTOR(a, b) ((a) = (b)->header.self)
 #define XSETSTRING(a, b) ((a) = (b)->self)
 #define XSETSYMBOL(a, b) ((a) = scm_c_vector_ref (b, 0))
 #define XSETMISC(a, b) (a) = ((union Lisp_Misc *) (b))->u_any.self
+#define make_lisp_proc(p) ((p)->header.self)
 
 /* Pseudovector types.  */