guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fix broken slot allocation


From: Andy Wingo
Subject: [PATCH] fix broken slot allocation
Date: Sun, 6 Apr 2003 12:57:00 +0100
User-agent: Mutt/1.5.3i

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]