]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/comp.c (native-comp-unit-set-file): New function.
authorAndrea Corallo <akrl@sdf.org>
Fri, 10 Apr 2020 21:24:07 +0000 (22:24 +0100)
committerAndrea Corallo <akrl@sdf.org>
Sun, 12 Apr 2020 12:31:38 +0000 (13:31 +0100)
src/data.c

index 2040e4eaecd44e4e203444159340a7eda5be154f..1809d58c2c7f64daf68b1a590812ca7755871a29 100644 (file)
@@ -884,9 +884,19 @@ DEFUN ("native-comp-unit-file", Fnative_comp_unit_file,
        Snative_comp_unit_file, 1, 1, 0,
        doc: /* Return the file of the native compilation unit.  */)
   (Lisp_Object comp_unit)
+{
+  CHECK_TYPE (NATIVE_COMP_UNITP (comp_unit), Qnative_comp_unit, comp_unit);
+  return XNATIVE_COMP_UNIT (comp_unit)->file;
+}
+
+DEFUN ("native-comp-unit-set-file", Fnative_comp_unit_set_file,
+       Snative_comp_unit_set_file, 2, 2, 0,
+       doc: /* Return the file of the native compilation unit.  */)
+  (Lisp_Object comp_unit, Lisp_Object new_file)
 {
   CHECK_TYPE (NATIVE_COMP_UNITP (comp_unit), Qnative_comp_unit, comp_unit);
   XNATIVE_COMP_UNIT (comp_unit)->file = new_file;
+  return comp_unit;
 }
 
 #endif
@@ -4007,6 +4017,7 @@ syms_of_data (void)
   defsubr (&Ssubr_native_elisp_p);
   defsubr (&Ssubr_native_comp_unit);
   defsubr (&Snative_comp_unit_file);
+  defsubr (&Snative_comp_unit_set_file);
 #endif
 #ifdef HAVE_MODULES
   defsubr (&Suser_ptrp);