From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Rottmann Newsgroups: gmane.lisp.guile.devel Subject: Re: Fixing goops-1 Date: 03 Oct 2002 22:45:14 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <87smznp7z9.fsf@alice.rotty.yi.org> References: <87u1k6qalv.fsf@alice.rotty.yi.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1033704829 7898 127.0.0.1 (4 Oct 2002 04:13:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 4 Oct 2002 04:13:49 +0000 (UTC) Return-path: Original-Received: from mail-relay.eunet.no ([193.71.71.242]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17xJqV-00023C-00 for ; Fri, 04 Oct 2002 06:13:47 +0200 Original-Received: from monty-python.gnu.org (monty-python.gnu.org [199.232.76.173]) by mail-relay.eunet.no (8.12.2/8.12.2/GN) with ESMTP id g944ECML083016 for ; Fri, 4 Oct 2002 06:14:12 +0200 (CEST) (envelope-from guile-devel-admin@gnu.org) Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17xJqe-0004hC-00; Fri, 04 Oct 2002 00:13:56 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17xCqX-0005ak-00 for guile-devel@gnu.org; Thu, 03 Oct 2002 16:45:21 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17xCqU-0005Ys-00 for guile-devel@gnu.org; Thu, 03 Oct 2002 16:45:20 -0400 Original-Received: from sproxy.gmx.net ([213.165.64.20] helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.10) id 17xCqT-0005YA-00 for guile-devel@gnu.org; Thu, 03 Oct 2002 16:45:17 -0400 Original-Received: (qmail 24888 invoked by uid 0); 3 Oct 2002 20:45:15 -0000 Original-Received: from m181p026.adsl.highway.telekom.at (HELO alice.rhinosaur.lan) (62.47.190.154) by mail.gmx.net (mp001-rz3) with SMTP; 3 Oct 2002 20:45:15 -0000 Original-Received: from andy by alice.rhinosaur.lan with local (Exim 3.36 #1 (Debian)) id 17xCqQ-0001Kd-00 for ; Thu, 03 Oct 2002 22:45:14 +0200 Original-To: guile-devel@gnu.org In-Reply-To: Original-Lines: 48 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1408 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1408 Neil Jerram writes: > >>>>> "Andreas" == Andreas Rottmann writes: > > Andreas> Hi! Remember the goops-1 bug? I'd really like this one > Andreas> fixed, since it is stopping me to test Guile as an > Andreas> extension language for my C++ programs - I'd be stick > Andreas> with Python ;-)). However, I don't have the necessary > Andreas> insight into the GOOPS internals. If someone of GOOPS > Andreas> authorship or deeper GOOPS knowledge could guide me, I > Andreas> would like help, though. > > Hi Andy, > > I don't fully understand this stuff, but through a kind of > investigation and experimentation, I have a solution. If you change > the second arg of scm_closure from SCM_EOL to scm_top_level_env > (SCM_TOP_LEVEL_LOOKUP_CLOSURE), the define-method call works. > > Full patch (to your source) is below. I played around with this by > inserting scm_shell, so that I could use the debugger interactively to > look at frames, which in turn needed SCM_RECORD_POSITIONS_P = 1 and > the commenting out of the `:no-backtrace' option in the GOOPS .scm > files. I tested the commented out define-method call by typing it > into the Guile shell. > > I'm guessing that you took your model from scm_add_slot, which also > passes SCM_EOL to scm_closure. However, note that nothing in Guile > actually uses scm_add_slot ... :-) > Yes, seems we can close that bug. I have replaced all passes of SCM_EOL scm_closure with scm_top_level_env(SCM_TOP_LEVEL_LOOKUP_CLOSURE) and the code works now. Thanks a lot! One should perhaps consider doing the same in goops.c, too. However, scm_closure and the other stuff should be documented somewher ;-) Regards, Andy PS: No need to CC me, I am one guile-devel, however, Neil, your reply wasn't on devel, altough you have CC'd it. Perhaps my fetchmail has messed it up... -- Andreas Rottmann | Dru@ICQ | 118634484@ICQ | a.rottmann@gmx.at http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel