From a1fd3d6eacaf425eadd121dcacee95a26f96505f Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 14 Nov 2019 21:36:30 +0100 Subject: [PATCH] improve subr-native-elisp-p --- src/data.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.39.5