]> git.eshelyaron.com Git - emacs.git/commitdiff
some rename on compilation unit struct
authorAndrea Corallo <akrl@sdf.org>
Sun, 22 Dec 2019 07:12:27 +0000 (08:12 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:14 +0000 (11:38 +0100)
src/alloc.c
src/comp.c
src/comp.h
src/lisp.h
src/print.c

index 547990c7a9ed36189ece67376912d6407c2b6025..d47f9c8a574e9e9a50eb8132ff1f01c80a41b90d 100644 (file)
@@ -3026,8 +3026,8 @@ cleanup_vector (struct Lisp_Vector *vector)
 #ifdef HAVE_NATIVE_COMP
   else if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_NATIVE_COMP_UNIT))
     {
-      struct Lisp_Native_Compilation_Unit *cu =
-       PSEUDOVEC_STRUCT (vector, Lisp_Native_Compilation_Unit);
+      struct Lisp_Native_Comp_Unit *cu =
+       PSEUDOVEC_STRUCT (vector, Lisp_Native_Comp_Unit);
       eassert (cu->handle);
       dynlib_close (cu->handle);
     }
@@ -6576,7 +6576,7 @@ mark_object (Lisp_Object arg)
          case PVEC_NATIVE_COMP_UNIT:
            set_vector_marked (ptr);
            /* FIXME see comp.h.  */
-           mark_object (XCOMPILATION_UNIT (obj)->data_vec);
+           mark_object (XNATIVE_COMP_UNIT (obj)->data_vec);
 #endif
            break;
          case PVEC_FREE:
index 71d4d79f9e750efd27224ed919e718c271e568ef..c74e5cf2e6c54a5a760be01f8b70752726155083 100644 (file)
@@ -3227,7 +3227,7 @@ load_static_obj (dynlib_handle_ptr handle, const char *name)
 static void
 load_comp_unit (Lisp_Object comp_u_obj, Lisp_Object file)
 {
-  struct Lisp_Native_Compilation_Unit *comp_u = XCOMPILATION_UNIT (comp_u_obj);
+  struct Lisp_Native_Comp_Unit *comp_u = XNATIVE_COMP_UNIT (comp_u_obj);
   dynlib_handle_ptr handle = comp_u->handle;
   struct thread_state ***current_thread_reloc =
     dynlib_sym (handle, CURRENT_THREAD_RELOC_SYM);
@@ -3271,7 +3271,7 @@ DEFUN ("comp--register-subr", Fcomp__register_subr, Scomp__register_subr,
       Lisp_Object c_name, Lisp_Object doc, Lisp_Object intspec)
 {
   Lisp_Object comp_u = XCAR (load_handle_stack);
-  dynlib_handle_ptr handle = XCOMPILATION_UNIT (comp_u)->handle;
+  dynlib_handle_ptr handle = XNATIVE_COMP_UNIT (comp_u)->handle;
   if (!handle)
     xsignal0 (Qwrong_register_subr_call);
 
@@ -3313,7 +3313,7 @@ DEFUN ("native-elisp-load", Fnative_elisp_load, Snative_elisp_load, 1, 1, 0,
   /* FIXME non portable.  */
   /* We copy the content of the file to be loaded in a memory mapped
      file.  We then keep track of this in the struct
-     Lisp_Native_Compilation_Unit.  In case this will be overwritten
+     Lisp_Native_Comp_Unit.  In case this will be overwritten
      or delete we'll dump the right data.  */
   int fd_in = emacs_open (SSDATA (file), O_RDONLY, 0);
   int fd_out = memfd_create (SSDATA (file), 0);
index 876615e8dd4455c2d3cc6598f071dc1124ac7fb5..04c5727866723d528be47a94ef4daeef5eb029dc 100644 (file)
@@ -23,7 +23,7 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <dynlib.h>
 
-struct Lisp_Native_Compilation_Unit
+struct Lisp_Native_Comp_Unit
 {
   union vectorlike_header header;
   /* Compilation unit file descriptor and handle.  */
@@ -33,16 +33,16 @@ struct Lisp_Native_Compilation_Unit
 };
 
 INLINE bool
-COMPILATIONP_UNITP (Lisp_Object a)
+NATIVE_COMP_UNITP (Lisp_Object a)
 {
   return PSEUDOVECTORP (a, PVEC_NATIVE_COMP_UNIT);
 }
 
-INLINE struct Lisp_Native_Compilation_Unit *
-XCOMPILATION_UNIT (Lisp_Object a)
+INLINE struct Lisp_Native_Comp_Unit *
+XNATIVE_COMP_UNIT (Lisp_Object a)
 {
-  eassert (COMPILATIONP_UNITP (a));
-  return XUNTAG (a, Lisp_Vectorlike, struct Lisp_Native_Compilation_Unit);
+  eassert (NATIVE_COMP_UNITP (a));
+  return XUNTAG (a, Lisp_Vectorlike, struct Lisp_Native_Comp_Unit);
 }
 
 /* Defined in comp.c.  */
index 3d467a84d18d53eda702de810055c890a1fc88bc..2e4a6c898467b2ee8129b84473dda9ee3a979ca8 100644 (file)
@@ -4772,11 +4772,11 @@ SUBRP_NATIVE_COMPILEDP (Lisp_Object a)
 INLINE Lisp_Object
 make_native_comp_u (int fd, dynlib_handle_ptr handle)
 {
-  struct Lisp_Native_Compilation_Unit *x =
-    (struct Lisp_Native_Compilation_Unit *) allocate_pseudovector (
-                                 VECSIZE (struct Lisp_Native_Compilation_Unit),
-                                 0, VECSIZE (struct Lisp_Native_Compilation_Unit),
-                                 PVEC_NATIVE_COMP_UNIT);
+  struct Lisp_Native_Comp_Unit *x =
+    (struct Lisp_Native_Comp_Unit *) allocate_pseudovector (
+                                      VECSIZE (struct Lisp_Native_Comp_Unit),
+                                      0, VECSIZE (struct Lisp_Native_Comp_Unit),
+                                      PVEC_NATIVE_COMP_UNIT);
   x->fd = fd;
   x->handle = handle;
   Lisp_Object cu;
index e7ddafbbbbd2b6ac8d1dbcf9ab5e2cb615d6308d..4d7932a81d7b294ca97045ed1f086d3c34606525 100644 (file)
@@ -1829,7 +1829,7 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
     case PVEC_NATIVE_COMP_UNIT:
       {
        print_c_string ("#<native compilation unit ", printcharfun);
-       int len = sprintf (buf, "%d", XCOMPILATION_UNIT (obj)->fd);
+       int len = sprintf (buf, "%d", XNATIVE_COMP_UNIT (obj)->fd);
        strout (buf, len, len, printcharfun);
        printchar ('>', printcharfun);
       }