]> git.eshelyaron.com Git - emacs.git/commitdiff
add native-comp-unit-file primitive
authorAndrea Corallo <akrl@sdf.org>
Mon, 23 Dec 2019 08:40:41 +0000 (09:40 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:15 +0000 (11:38 +0100)
src/data.c

index 70f8a8f2c1a6d346a7a13d4188c6e1ae6c9d030e..3fb0fc0a1907300d853314323dfc4eeaa1490138 100644 (file)
@@ -883,6 +883,15 @@ DEFUN ("subr-native-comp-unit", Fsubr_native_comp_unit,
   CHECK_SUBR (subr);
   return XSUBR (subr)->native_comp_u;
 }
+
+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 object)
+{
+  CHECK_TYPE (NATIVE_COMP_UNITP (object), Qnative_comp_unit, object);
+  return XNATIVE_COMP_UNIT (object)->file;
+}
 #endif
 
 DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0,
@@ -4011,7 +4020,8 @@ syms_of_data (void)
   defsubr (&Ssubr_name);
 #ifdef HAVE_NATIVE_COMP
   defsubr (&Ssubr_native_elisp_p);
-  defsubr (&Ssubr_native_compilation_unit);
+  defsubr (&Ssubr_native_comp_unit);
+  defsubr (&Snative_comp_unit_file);
 #endif
 #ifdef HAVE_MODULES
   defsubr (&Suser_ptrp);