From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] fix broken slot allocation Date: Sun, 6 Apr 2003 12:57:00 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <20030406115700.GA13339@lark> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1049724443 10168 80.91.224.249 (7 Apr 2003 14:07:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Apr 2003 14:07:23 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 07 16:07:20 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 192XH7-0002cr-00 for ; Mon, 07 Apr 2003 16:07:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 192XH1-0003uL-05 for guile-devel@m.gmane.org; Mon, 07 Apr 2003 10:06:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 192XEO-000287-00 for guile-devel@gnu.org; Mon, 07 Apr 2003 10:04:16 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 192XEA-0001pr-00 for guile-devel@gnu.org; Mon, 07 Apr 2003 10:04:03 -0400 Original-Received: from mail225.mail.bellsouth.net ([205.152.58.195] helo=imf23bis.bellsouth.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 192XCQ-0000Pu-00 for guile-devel@gnu.org; Mon, 07 Apr 2003 10:02:14 -0400 Original-Received: from fridge ([66.157.115.125]) by imf23bis.bellsouth.net (InterMail vM.5.01.04.25 201-253-122-122-125-20020815) with ESMTP id <20030407140417.JWGC5151.imf23bis.bellsouth.net@fridge> for ; Mon, 7 Apr 2003 10:04:17 -0400 Original-Received: from lark (mantis.schoolnet.na [::ffff:196.44.140.238]) (AUTH: LOGIN wingo) by fridge with esmtp; Mon, 07 Apr 2003 10:02:14 -0400 Original-Received: from wingo by lark with local (Exim 3.36 #1 (Debian)) id 1928lh-0003be-00 for ; Sun, 06 Apr 2003 12:57:01 +0100 Original-To: guile-devel@gnu.org Content-Disposition: inline X-Operating-System: Linux lark 2.4.20 User-Agent: Mutt/1.5.3i X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2143 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2143 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