From: Andrea Corallo Date: Mon, 23 Dec 2019 08:04:24 +0000 (+0100) Subject: add subr-native-compilation-unit primitive X-Git-Tag: emacs-28.0.90~2727^2~895 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fd3c00ff92826b466a3292a05072eb5b4f23a701;p=emacs.git add subr-native-compilation-unit primitive --- diff --git a/src/data.c b/src/data.c index 73ddb021e23..70f8a8f2c1a 100644 --- a/src/data.c +++ b/src/data.c @@ -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);