mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
(make_save_value): New function.
This commit is contained in:
parent
781d152abe
commit
42172a6ba0
20
src/alloc.c
20
src/alloc.c
@ -2631,6 +2631,26 @@ allocate_misc ()
|
||||
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. */)
|
||||
()
|
||||
|
Loading…
Reference in New Issue
Block a user