This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Undefined variable in goops.scm ?
- To: guile at sourceware dot cygnus dot com
- Subject: Undefined variable in goops.scm ?
- From: Thierry Bezecourt <thbz at worldnet dot fr>
- Date: Mon, 10 Jan 2000 10:27:32 +0100
I receive an error when I try to use an accessor on a "virtual" slot in a
Goops object. Consider for example the following code (from the Guile shell
or loaded from a file) :
(use-modules (oop goops))
(define-class <person> ()
(age #:allocation #:virtual
#:accessor age
#:slot-ref (lambda (o) 42)
#:slot-set! (lambda (o v) 43)))
(define paul (make <person>))
(age paul)
=> ERROR: In expression (assert-bound 42 o):
ERROR: Unbound variable: assert-bound
ABORT: (misc-error)
I'm using Guile 1.3.4, Goops 0.1.6 under GNU/Linux 2.2.10.
Additional information, which may or may not be useful : I noticed that
`assert-bound' is used in goops.scm, and is implemented as a C static
function (`scm_assert_bound()') in goops.c . My first thought was that the
function was not available at the Scheme level because it was defined as
static in C, so I tried to remove the "static" keyword and recompile
everything. But it did not fix the problem.
Worse, I also wrote a 3-line experimental C program which just called
`scm_assert_bound' ; I could not link it while `scm_assert_bound' was
static, but I could link it after I redefined it as non-static. I don't
know why I cannot access this function from Scheme when I can access it
from C.
Thanks for any help.
Thierry Bézecourt
thbz@worldnet.fr