From: Andreas Rottmann <a.rottmann@gmx.at>
Subject: Re: Fixing goops-1
Date: 03 Oct 2002 22:45:14 +0200 [thread overview]
Message-ID: <87smznp7z9.fsf@alice.rotty.yi.org> (raw)
In-Reply-To: <m3bs6ch1q8.fsf@laruns.ossau.uklinux.net>
Neil Jerram <neil@ossau.uklinux.net> writes:
> >>>>> "Andreas" == Andreas Rottmann <a.rottmann@gmx.at> 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
next prev parent reply other threads:[~2002-10-03 20:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-01 18:26 Fixing goops-1 Andreas Rottmann
2002-10-02 23:15 ` Neil Jerram
2002-10-03 20:45 ` Andreas Rottmann [this message]
2002-10-04 18:45 ` Neil Jerram
2002-10-03 21:33 ` Neil Jerram
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=87smznp7z9.fsf@alice.rotty.yi.org \
--to=a.rottmann@gmx.at \
/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).