From: Andy Wingo <wingo@pobox.com>
To: Tristan Colgate <tcolgate@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: Does anyone have an applicable struct example
Date: Tue, 29 Jun 2010 11:56:49 +0200 [thread overview]
Message-ID: <m3vd92w49q.fsf@unquote.localdomain> (raw)
In-Reply-To: <AANLkTilK-JEqH10LimscAxsfLS6d5dTgV8Qh8OWoYkcl@mail.gmail.com> (Tristan Colgate's message of "Fri, 25 Jun 2010 10:14:06 +0100")
Hi Tristan,
On Fri 25 Jun 2010 11:14, Tristan Colgate <tcolgate@gmail.com> writes:
> I'd like to make use of the applicable structs feature but am
> running into problems.
Apologies for the lack of docs; it's on my list, but I haven't gotten to
it yet.
> From what I can gather from the release note that mentions it, the
> following should work,
> instead, I get a segfault.
>
> scheme@(guile-user)> (define <mything-vtable> (make-struct
> <applicable-struct-vtable> 0))
> scheme@(guile-user)> (define mything (make-struct <mything-vtable> 0
> (lambda()(display "some code")(newline))))
> Segmentation fault (core dumped)
Ew, will fix.
> Looking around goops.scm I can see some classes for applicable structs
> that look a bit nicer, but these seem
> to use set-object-procedure! which isn't exported (and I can't find a
> definition)....
I have applied your fix to this one.
> What am I doing wrong?
You are doing everything right, it's just that you found a couple bugs
in a recently-rewritten part of Guile. Apologies again!
Happy hacking,
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2010-06-29 9:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-25 9:14 Does anyone have an applicable struct example Tristan Colgate
2010-06-28 10:06 ` Tristan Colgate
2010-06-29 2:16 ` Nala Ginrut
2010-06-29 9:56 ` Andy Wingo [this message]
2010-08-29 18:48 ` Andy Wingo
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=m3vd92w49q.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=guile-user@gnu.org \
--cc=tcolgate@gmail.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).