x->s.symbol_name = xstrdup (SSDATA (Fsymbol_name (name)));
x->s.native_intspec = intspec;
x->s.native_doc = doc;
- x->s.native_elisp = true;
XSETPVECTYPE (&x->s, PVEC_SUBR);
Lisp_Object tem;
XSETSUBR (tem, &x->s);
nil otherwise. */)
(Lisp_Object object)
{
- return (SUBRP (object) && XSUBR (object)->native_elisp) ? Qt : Qnil;
+ return (SUBRP (object) && XSUBR (object)->native_comp_u) ? Qt : Qnil;
}
#endif
if (SUBRP (fun))
{
#ifdef HAVE_NATIVE_COMP
- if (XSUBR (fun)->native_elisp && XSUBR (fun)->native_intspec)
+ if (XSUBR (fun)->native_comp_u && XSUBR (fun)->native_intspec)
return XSUBR (fun)->native_intspec;
#endif
const char *spec = XSUBR (fun)->intspec;
#include <intprops.h>
#include <verify.h>
+#ifdef HAVE_NATIVE_COMP
+#include <dynlib.h>
+#endif
+
INLINE_HEADER_BEGIN
/* Define a TYPE constant ID as an externally visible name. Use like this:
char_table_set (ct, idx, val);
}
+struct Native_Compilation_Unit
+{
+ dynlib_handle_ptr handle;
+};
+
/* This structure describes a built-in function.
It is generated by the DEFUN macro only.
defsubr makes it into a Lisp object. */
Lisp_Object native_doc;
};
#ifdef HAVE_NATIVE_COMP
- bool native_elisp;
+ struct Native_Compilation_Unit *native_comp_u;;
#endif
} GCALIGNED_STRUCT;
union Aligned_Lisp_Subr
dump_field_emacs_ptr (ctx, &out, subr, &subr->intspec);
DUMP_FIELD_COPY (&out, subr, doc);
#ifdef HAVE_NATIVE_COMP
- DUMP_FIELD_COPY (&out, subr, native_elisp);
+ dump_field_emacs_ptr (ctx, &out, subr, &subr->native_comp_u);
#endif
return dump_object_finish (ctx, &out, sizeof (out));
}