[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixing goops-1
From: |
Andreas Rottmann |
Subject: |
Re: Fixing goops-1 |
Date: |
03 Oct 2002 22:45:14 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Neil Jerram <address@hidden> writes:
> >>>>> "Andreas" == Andreas Rottmann <address@hidden> 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 | address@hidden | address@hidden |
address@hidden
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