guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does anyone have an applicable struct example


From: Andy Wingo
Subject: Re: Does anyone have an applicable struct example
Date: Tue, 29 Jun 2010 11:56:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi Tristan,

On Fri 25 Jun 2010 11:14, Tristan Colgate <address@hidden> 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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]