guile-user
[Top][All Lists]
Advanced

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

RE: Guile truly embedable ?


From: Nicholas Harbour
Subject: RE: Guile truly embedable ?
Date: Mon, 30 Apr 2001 16:45:42 -0400

>I had a look at guile to see how I can use it to add some scripting
>functionality to an application.
>There was one "bad thing", the fact that the "scm_boot_guile" function
>doesn't return (guile-1.4)....
>I found in the mail archive a message about a new "scm_init_guile"
>function, would it help, for
>example to make a  .so with the guile env. plus some glue my program
>could dynamically load and later call ?
>if yes, in wich version is "scm_init_guile" available ?

forgive me for being new to guile, but I am a bit confused here.  The method
I am currently using differs from this one and I was wondering which is the
preferred way.  The program I am working on uses gh_enter() and then calls
gh_eval_file() on a startup script, then later on in the program it uses
various methods to get the values of certain variables that are defined in
the startup scripts.  I assumed this fit the bill as embeddable since the
main execution of the program lies outside of guile.  should I be using the
scm_boot_guile method instead of the gh_* method?

also, I am a little uncertain as to the method I am using to retrieve the
values.  For example, If the variable is defined in the startup script as
something like
        (define foo "bar")
then the way I am currently accessing it is like this:
        SCM foo_scm;
        char *foo;
        int foo_len;

        foo_scm = gh_eval_str("foo");
        foo = gh_scm2newstr(foo_scm, &foo_len);

Is there a better way to access scheme values by name and not by SCM?

Thanks in advance for your patience and brain quanta.

Nicholas Harbour




reply via email to

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