#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);
}
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:
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);
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);
/* 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);
#include <dynlib.h>
-struct Lisp_Native_Compilation_Unit
+struct Lisp_Native_Comp_Unit
{
union vectorlike_header header;
/* Compilation unit file descriptor and handle. */
};
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. */
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;
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);
}