unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
Subject: [PATCH] fix broken slot allocation
Date: Sun, 6 Apr 2003 12:57:00 +0100	[thread overview]
Message-ID: <20030406115700.GA13339@lark> (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


             reply	other threads:[~2003-04-06 11:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-06 11:57 Andy Wingo [this message]
2003-04-07 18:16 ` [PATCH] fix broken slot allocation Mikael Djurfeldt
2003-04-11  9:29   ` Mikael Djurfeldt
2003-04-11  9:42     ` Mikael Djurfeldt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030406115700.GA13339@lark \
    --to=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).