changeset 49055:cea2e52c7ca5

(make_save_value): New function.
author Richard M. Stallman <rms@gnu.org>
date Mon, 06 Jan 2003 00:45:45 +0000
parents 6b6ac8aa78d2
children 88f14a14e005
files src/alloc.c
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c	Mon Jan 06 00:45:31 2003 +0000
+++ b/src/alloc.c	Mon Jan 06 00:45:45 2003 +0000
@@ -2631,6 +2631,26 @@
   return val;
 }
 
+/* Return a Lisp_Misc_Save_Value object containing POINTER and
+   INTEGER.  This is used to package C values to call record_unwind_protect.
+   The unwind function can get the C values back using XSAVE_VALUE.  */
+
+Lisp_Object
+make_save_value (pointer, integer)
+     void *pointer;
+     int integer;
+{
+  register Lisp_Object val;
+  register struct Lisp_Save_Value *p;
+
+  val = allocate_misc ();
+  XMISCTYPE (val) = Lisp_Misc_Save_Value;
+  p = XSAVE_VALUE (val);
+  p->pointer = pointer;
+  p->integer = integer;
+  return val;
+}
+
 DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0,
        doc: /* Return a newly allocated marker which does not point at any place.  */)
      ()