dll_handle dlhandle; /* Dynamic lib handle */
} emodules_list;
+static Lisp_Object Vmodule_extensions;
+
static int emodules_depth;
static dll_handle dlhandle;
static emodules_list *modules;
* not previously loaded.
*/
if (modules == (emodules_list *)0)
- modules = (emodules_list *)xmalloc (sizeof(emodules_list));
+ modules = (emodules_list *) xmalloc (sizeof (emodules_list));
modnum++;
- modules = xrealloc (modules, modnum * sizeof(emodules_list));
+ modules = (emodules_list *) xrealloc (modules, modnum * sizeof (emodules_list));
fs = modnum - 1;
memset (&modules[fs], 0, sizeof(emodules_list));
GCPRO2(filename, foundname);
filename = build_string (tmod);
- fd = locate_file(Vmodule_load_path, filename, ":.ell:.so:.dll", &foundname, -1);
+ fd = locate_file(Vmodule_load_path, filename, Vmodule_extensions,
+ &foundname, -1);
UNGCPRO;
if (fd < 0)
{
Bytecount len = strlen (symname);
Lisp_Object sym = oblookup (Vobarray, (CONST Bufbyte *)symname, len);
- struct Lisp_Subr *subr;
+ Lisp_Subr *subr;
if (SYMBOLP(sym))
{
}
void
+reinit_vars_of_module (void)
+{
+ emodules_depth = 0;
+ modules = (emodules_list *)0;
+ modnum = 0;
+}
+
+void
vars_of_module (void)
{
+ reinit_vars_of_module ();
+
DEFVAR_LISP ("module-version", &Vmodule_version /*
Emacs dynamic loading mechanism version, as a string.
the dynamic loading technology used in Emacs, if required. It is not
a given that this value will be the same as the Emacs version number.
*/ );
- Vmodule_version = Fpurecopy (build_string (EMODULES_VERSION));
+ Vmodule_version = build_string (EMODULES_VERSION);
DEFVAR_BOOL ("load-modules-quietly", &load_modules_quietly /*
*Set to t if module loading is to be silent.
when a dynamic module is loaded.
*/);
+ /* #### Export this to Lisp */
+ Vmodule_extensions = build_string (":.ell:.so:.dll");
+ staticpro (&Vmodule_extensions);
+
load_modules_quietly = 0;
- emodules_depth = 0;
- modules = (emodules_list *)0;
- modnum = 0;
Vmodule_load_path = Qnil;
Fprovide (intern ("modules"));
}