* src/lisp.h (reset_image_types): Declare.
[WINDOWSNT] (Vlibrary_cache): Declare.
* src/image.c (reset_image_types): New function.
* src/emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
(syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
(Fdump_emacs): Reset Vlibrary_cache and image_types.
* src/w32.c (Vlibrary_cache): Do not define; moved to emacs.c
(globals_of_w32) <Vlibrary_cache>: Do not initialize.
* src/w32.h (Vlibrary_cache): Do not declare.
+2012-09-25 Juanma Barranquero <lekktu@gmail.com>
+
+ Move Vlibrary_cache to emacs.c and reset before dumping.
+
+ * lisp.h (reset_image_types): Declare.
+ [WINDOWSNT] (Vlibrary_cache): Declare.
+
+ * image.c (reset_image_types): New function.
+
+ * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
+ (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
+ (Fdump_emacs): Reset Vlibrary_cache and image_types.
+
+ * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
+ (globals_of_w32) <Vlibrary_cache>: Do not initialize.
+
+ * w32.h (Vlibrary_cache): Do not declare.
+
2012-09-25 Eli Zaretskii <eliz@gnu.org>
* w32proc.c (sys_signal): Handle all signals defined by the
/* Empty lisp strings. To avoid having to build any others. */
Lisp_Object empty_unibyte_string, empty_multibyte_string;
+#ifdef WINDOWSNT
+/* Cache for externally loaded libraries. */
+Lisp_Object Vlibrary_cache;
+#endif
+
/* Set after Emacs has started up the first time.
Prevents reinitialization of the Lisp world and keymaps
on subsequent starts. */
free (malloc_state_ptr);
#endif
+#ifdef WINDOWSNT
+ Vlibrary_cache = Qnil;
+#endif
+#ifdef HAVE_WINDOW_SYSTEM
+ reset_image_types ();
+#endif
+
Vpurify_flag = tem;
return unbind_to (count, Qnil);
Vdynamic_library_alist = Qnil;
Fput (intern_c_string ("dynamic-library-alist"), Qrisky_local_variable, Qt);
+#ifdef WINDOWSNT
+ Vlibrary_cache = Qnil;
+ staticpro (&Vlibrary_cache);
+#endif
+
/* Make sure IS_DAEMON starts up as false. */
daemon_pipe[1] = 0;
}
return NULL;
}
+/* Reset image_types before dumping.
+ Called from Fdump_emacs. */
+
+void
+reset_image_types (void)
+{
+ while (image_types)
+ {
+ struct image_type *next = image_types->next;
+ xfree (image_types);
+ image_types = next;
+ }
+}
+
void
syms_of_image (void)
{
- /* Initialize this only once, since that's what we do with Vimage_types
- and they are supposed to be in sync. Initializing here gives correct
- operation on GNU/Linux of calling dump-emacs after loading some images. */
+ /* Initialize this only once; it will be reset before dumping. */
image_types = NULL;
/* Must be defined now because we're going to update it below, while
extern Lisp_Object QCascent, QCmargin, QCrelief;
extern Lisp_Object QCconversion;
extern int x_bitmap_mask (struct frame *, ptrdiff_t);
+extern void reset_image_types (void);
extern void syms_of_image (void);
/* Defined in insdel.c. */
extern Lisp_Object Qfile_name_handler_alist;
extern _Noreturn void terminate_due_to_signal (int, int);
extern Lisp_Object Qkill_emacs;
+#ifdef WINDOWSNT
+extern Lisp_Object Vlibrary_cache;
+#endif
#if HAVE_SETLOCALE
void fixup_locale (void);
void synchronize_system_messages_locale (void);
\f
-/* Delayed loading of libraries. */
-
-Lisp_Object Vlibrary_cache;
-
/* Try loading LIBRARY_ID from the file(s) specified in
Vdynamic_library_alist. If the library is loaded successfully,
return the handle of the DLL, and record the filename in the
DEFSYM (QCloaded_from, ":loaded-from");
- Vlibrary_cache = Qnil;
- staticpro (&Vlibrary_cache);
-
g_b_init_is_windows_9x = 0;
g_b_init_open_process_token = 0;
g_b_init_get_token_information = 0;
extern int _sys_read_ahead (int fd);
extern int _sys_wait_accept (int fd);
-extern Lisp_Object Vlibrary_cache, QCloaded_from;
+extern Lisp_Object QCloaded_from;
extern HMODULE w32_delayed_load (Lisp_Object);
#ifdef HAVE_GNUTLS