From: Andrea Corallo Date: Thu, 14 Nov 2019 20:36:30 +0000 (+0100) Subject: improve subr-native-elisp-p X-Git-Tag: emacs-28.0.90~2727^2~994 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1fd3d6eacaf425eadd121dcacee95a26f96505f;p=emacs.git improve subr-native-elisp-p --- diff --git a/src/data.c b/src/data.c index 2a32d47c49b..50dce9e4644 100644 --- a/src/data.c +++ b/src/data.c @@ -866,12 +866,11 @@ 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 subr is native compiled elisp, + doc: /* Return t if the object is native compiled lisp function, nil otherwise. */) - (Lisp_Object subr) + (Lisp_Object object) { - CHECK_SUBR (subr); - return XSUBR (subr)->native_elisp ? Qt : Qnil; + return (SUBRP (object) && XSUBR (object)->native_elisp) ? Qt : Qnil; } #endif