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

index 73ddb021e23b8d2f862338a8dbad28c569943f7c..70f8a8f2c1a6d346a7a13d4188c6e1ae6c9d030e 100644 (file)
@@ -867,13 +867,22 @@ SUBR must be a built-in function.  */)
 }
 
 #ifdef HAVE_NATIVE_COMP
-DEFUN ("subr-native-elisp-p", Fsubr_native_elisp_p, Ssubr_native_elisp_p, 1, 1, 0,
-       doc: /* Return t if the object is native compiled lisp function,
+DEFUN ("subr-native-elisp-p", Fsubr_native_elisp_p, Ssubr_native_elisp_p, 1, 1,
+       0, doc: /* Return t if the object is native compiled lisp function,
 nil otherwise.  */)
   (Lisp_Object object)
 {
   return SUBRP_NATIVE_COMPILEDP (object) ? Qt : Qnil;
 }
+
+DEFUN ("subr-native-comp-unit", Fsubr_native_comp_unit,
+       Ssubr_native_comp_unit, 1, 1, 0,
+       doc: /* Return the native compilation unit.  */)
+  (Lisp_Object subr)
+{
+  CHECK_SUBR (subr);
+  return XSUBR (subr)->native_comp_u;
+}
 #endif
 
 DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0,
@@ -4002,6 +4011,7 @@ syms_of_data (void)
   defsubr (&Ssubr_name);
 #ifdef HAVE_NATIVE_COMP
   defsubr (&Ssubr_native_elisp_p);
+  defsubr (&Ssubr_native_compilation_unit);
 #endif
 #ifdef HAVE_MODULES
   defsubr (&Suser_ptrp);