Mercurial > hg > xemacs-beta
changeset 618:16ff693bd768
[xemacs-hg @ 2001-06-19 01:29:35 by ben]
window.c: We can't actually zero out everything in the window when deleting
it. set-window-configuration assumes that various slots of the
deleted window are still accurate.
author | ben |
---|---|
date | Tue, 19 Jun 2001 01:29:37 +0000 |
parents | af57a77cbc92 |
children | 8d7292eb4a18 |
files | src/ChangeLog src/window.c |
diffstat | 2 files changed, 34 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon Jun 18 07:10:32 2001 +0000 +++ b/src/ChangeLog Tue Jun 19 01:29:37 2001 +0000 @@ -1,3 +1,12 @@ +2001-06-18 Ben Wing <ben@xemacs.org> + + * window.c: + * window.c (mark_window_as_deleted): + * window.c (WINDOW_SLOT): + We can't actually zero out everything in the window when deleting + it. set-window-configuration assumes that various slots of the + deleted window are still accurate. + 2001-06-17 Ben Wing <ben@xemacs.org> ---------------------------------------------------------------
--- a/src/window.c Mon Jun 18 07:10:32 2001 +0000 +++ b/src/window.c Tue Jun 19 01:29:37 2001 +0000 @@ -1942,10 +1942,22 @@ reinitialized by the window-configuration code as necessary. */ finalize_window ((void *) w, 0); - /* Nobody should be accessing anything in this object any more, and - making them Qnil allows for better GC'ing in case a pointer to - the dead window continues to hang around. Zero all other structs - in case someone tries to access something through them. + /* "Nobody should be accessing anything in this object any more...", + I said, but unfortunately that's not quite true. + set-window-configuration undeletes the window and relies on + certain items to be there already. Fuckme! we really should + rewrite it in Lisp and just recreate the windows. (But does any + code depend on the pointers being the same? At the very least, + we should reinit everything in the window.) + + Nobody should be accessing anything in this object any more, + and making them Qnil allows for better GC'ing in case a pointer + to the dead window continues to hang around. Zero all other + structs in case someone tries to access something through them. + + (So, in point of fact, we zero out all of the "saved" slots, + which are obviously restored from the window config, plus the + slots which were already zeroed.) As an example of why setting the values to Qnil is good, here is an old comment: @@ -1963,11 +1975,17 @@ window-config data), we set them all to nil so that we are able to collect more actual garbage. */ - zero_lcrecord (w); - -#define WINDOW_SLOT(slot) w->slot = Qnil; +#define WINDOW_SLOT(slot) +#define WINDOW_SAVED_SLOT(slot, compare) w->slot = Qnil; #include "winslots.h" + w->next = Qnil; + w->prev = Qnil; + w->hchild = Qnil; + w->vchild = Qnil; + w->parent = Qnil; + w->subwindow_instance_cache = Qnil; + w->dead = 1; }