Hi,

I was playing with structs this morning, and I noticed that the
documentation example snarfed into struct.doc doesn't work right.

boxer:mcgrew-~/tmp$ guile
guile> (version)               
"1.4"
guile> (define x (make-vtable-vtable (make-struct-layout (quote pw)) 
                                     0 
                                     'foo))
guile> (struct-ref x vtable-offset-user)
#f
guile> vtable-offset-user
4
guile> (struct-ref x 3)                  
foo

However:

guile> (define y (make-vtable-vtable (make-struct-layout (quote pw)) 
                                     0 
                                     'foo 'bar))
guile> (struct-ref y vtable-offset-user)
bar

I don't know how structs are suppose to work so I can't tell if this
is a documention error, or a bug in the struct code.

Thanks,
Clark

Reply via email to