unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] fix broken slot allocation
@ 2003-04-06 11:57 Andy Wingo
  2003-04-07 18:16 ` Mikael Djurfeldt
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Wingo @ 2003-04-06 11:57 UTC (permalink / raw)


Hello,

You'll probably get my previous message first detailing the problem (I
haven't had internet in a few days, there's some mail sitting in the
queue...). I looked through the sources and came up with a patch -- the
index was not getting updated in the new (as of january, according to
the Changelog) allocation-avoidance code. Seems pretty trivial:

--- guile-1.6-1.6.3.orig/libguile/goops.c
+++ guile-1.6-1.6.3/libguile/goops.c
@@ -505,12 +505,10 @@
       len = scm_ilength (SCM_CDAR (slots));
       allocation = scm_i_get_keyword (k_allocation, SCM_CDAR (slots),
 				      len, k_instance, FUNC_NAME);
-      while (!SCM_EQ_P (allocation, k_instance))
-	{
+      if (!SCM_EQ_P (allocation, k_instance))
+	{
 	  slots = SCM_CDR (slots);
-	  len = scm_ilength (SCM_CDAR (slots));
-	  allocation = scm_i_get_keyword (k_allocation, SCM_CDAR (slots),
-					  len, k_instance, FUNC_NAME);
+	  continue;
 	}
       type = scm_i_get_keyword (k_class, SCM_CDAR (slots),
 				len, SCM_BOOL_F, FUNC_NAME);

The aforementioned problem with guile-gobject goes away when this patch
is applied.

Regards,

wingo.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-04-11  9:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-06 11:57 [PATCH] fix broken slot allocation Andy Wingo
2003-04-07 18:16 ` Mikael Djurfeldt
2003-04-11  9:29   ` Mikael Djurfeldt
2003-04-11  9:42     ` Mikael Djurfeldt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).