]> git.eshelyaron.com Git - emacs.git/commitdiff
introduce SUBRP_NATIVE_COMPILEDP
authorAndrea Corallo <akrl@sdf.org>
Fri, 20 Dec 2019 04:53:28 +0000 (05:53 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:14 +0000 (11:38 +0100)
src/alloc.c
src/data.c
src/lisp.h

index d990f53f7a02908b4f3d80808ea142ffec64cd3f..dba2c2df88147277f9f8dafb2123841ef0883567 100644 (file)
@@ -6566,7 +6566,7 @@ mark_object (Lisp_Object arg)
 
          case PVEC_SUBR:
 #ifdef HAVE_NATIVE_COMP
-           if (XSUBR (obj)->native_comp_u)
+           if (SUBRP_NATIVE_COMPILEDP (obj))
              set_vector_marked (ptr);
 #endif
            break;
@@ -6715,7 +6715,7 @@ survives_gc_p (Lisp_Object obj)
     case Lisp_Vectorlike:
 #ifdef HAVE_NATIVE_COMP
       survives_p =
-       (SUBRP (obj) && !XSUBR (obj)->native_comp_u) ||
+       (SUBRP (obj) && !SUBRP_NATIVE_COMPILEDP (obj)) ||
        vector_marked_p (XVECTOR (obj));
 #else
       survives_p = SUBRP (obj) || vector_marked_p (XVECTOR (obj));
index 0a13569bc6d99dacc1d0940e265097430d38f129..fd20ecce6961f63b7c073316a2398fa2d49eee81 100644 (file)
@@ -870,7 +870,7 @@ DEFUN ("subr-native-elisp-p", Fsubr_native_elisp_p, Ssubr_native_elisp_p, 1, 1,
 nil otherwise.  */)
   (Lisp_Object object)
 {
-  return (SUBRP (object) && XSUBR (object)->native_comp_u) ? Qt : Qnil;
+  return SUBRP_NATIVE_COMPILEDP (object) ? Qt : Qnil;
 }
 #endif
 
@@ -900,7 +900,7 @@ Value, if non-nil, is a list (interactive SPEC).  */)
   if (SUBRP (fun))
     {
 #ifdef HAVE_NATIVE_COMP
-      if (XSUBR (fun)->native_comp_u && XSUBR (fun)->native_intspec)
+      if (SUBRP_NATIVE_COMPILEDP (fun) && XSUBR (fun)->native_intspec)
        return XSUBR (fun)->native_intspec;
 #endif
       const char *spec = XSUBR (fun)->intspec;
index bb441b181a1a1db7e1e7ea99896c36f4e0a4aa3b..05d6ef0d22a0558274252219c14b248036221a07 100644 (file)
@@ -2136,6 +2136,14 @@ enum char_table_specials
       = PSEUDOVECSIZE (struct Lisp_Sub_Char_Table, contents) - 1
   };
 
+#ifdef HAVE_NATIVE_COMP
+INLINE bool
+SUBRP_NATIVE_COMPILEDP (Lisp_Object a)
+{
+  return SUBRP (a) && XSUBR (a)->native_comp_u;
+}
+#endif
+
 /* Sanity-check pseudovector layout.  */
 verify (offsetof (struct Lisp_Char_Table, defalt) == header_size);
 verify (offsetof (struct Lisp_Char_Table, extras)