This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: "unbound location string->number"
- From: Jim White <jim at pagesmiths dot com>
- To: Steve Smith <tarka at internode dot on dot net>
- Cc: kawa at sources dot redhat dot com
- Date: Wed, 30 Aug 2006 00:30:07 -0700
- Subject: Re: "unbound location string->number"
- References: <20060830054503.GA16452@lucretia.remote.isay.com.au>
You don't show what your Java code is, but I'm guessing you are missing
environment initialization:
http://www.gnu.org/software/kawa/Evaluating-Scheme-expressions-from-Java.html
void Scheme.registerEnvironment ()
Initializes the Scheme environment. Maybe needed if you try to load
a module compiled from a Scheme source file.
Jim
Steve Smith wrote:
> Hi,
>
> I have the following 'pure' Scheme module that I intend to call from
> my plugin adapter class ...
>
> (module-name 'au.com.isay.confluence.plugins.torrent.Bencode)
> (module-static #t)
>
> ;; ...
>
> (define (bdec-int iport)
> (let ((c (read-char iport))) ; Pop flag off the front
> (string->number (snarf-until iport #\e))))
>
> ;; ...
>
> This works fine in interpreted mode for unit tests, however when
> compiled and called from the class I get the following error:
>
> src/bencode.scm:28:7: unbound location string->number
>
> Do I need to require some core namespace in this environment?
>
> Cheers,
> Steve
>