]> git.eshelyaron.com Git - emacs.git/commitdiff
improve subr-native-elisp-p
authorAndrea Corallo <akrl@sdf.org>
Thu, 14 Nov 2019 20:36:30 +0000 (21:36 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:05 +0000 (11:38 +0100)
src/data.c

index 2a32d47c49b4c647eaf28066e21b68bc1ff152c1..50dce9e4644664bbea4002a223c6fb24a22f7e72 100644 (file)
@@ -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