[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110195: Move Vlibrary_cache to emacs
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110195: Move Vlibrary_cache to emacs.c and reset before dumping. |
Date: |
Tue, 25 Sep 2012 13:57:30 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110195
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Tue 2012-09-25 13:57:30 +0200
message:
Move Vlibrary_cache to emacs.c and reset before dumping.
* 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.
modified:
src/ChangeLog
src/emacs.c
src/image.c
src/lisp.h
src/w32.c
src/w32.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-09-25 11:50:01 +0000
+++ b/src/ChangeLog 2012-09-25 11:57:30 +0000
@@ -1,3 +1,21 @@
+2012-09-25 Juanma Barranquero <address@hidden>
+
+ 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 <address@hidden>
* w32proc.c (sys_signal): Handle all signals defined by the
=== modified file 'src/emacs.c'
--- a/src/emacs.c 2012-09-25 11:50:01 +0000
+++ b/src/emacs.c 2012-09-25 11:57:30 +0000
@@ -96,6 +96,11 @@
/* 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. */
@@ -2025,6 +2030,13 @@
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);
@@ -2357,6 +2369,11 @@
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;
}
=== modified file 'src/image.c'
--- a/src/image.c 2012-09-24 21:38:23 +0000
+++ b/src/image.c 2012-09-25 11:57:30 +0000
@@ -8831,12 +8831,24 @@
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
=== modified file 'src/lisp.h'
--- a/src/lisp.h 2012-09-24 21:38:23 +0000
+++ b/src/lisp.h 2012-09-25 11:57:30 +0000
@@ -2731,6 +2731,7 @@
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. */
@@ -3284,6 +3285,9 @@
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);
=== modified file 'src/w32.c'
--- a/src/w32.c 2012-09-25 11:50:01 +0000
+++ b/src/w32.c 2012-09-25 11:57:30 +0000
@@ -6521,10 +6521,6 @@
-/* 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
@@ -6769,9 +6765,6 @@
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;
=== modified file 'src/w32.h'
--- a/src/w32.h 2012-09-25 11:50:01 +0000
+++ b/src/w32.h 2012-09-25 11:57:30 +0000
@@ -145,7 +145,7 @@
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110195: Move Vlibrary_cache to emacs.c and reset before dumping.,
Juanma Barranquero <=