guile-user
[Top][All Lists]
Advanced

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

Re: Geting the value of a top level scheme value from C


From: Thompson, David
Subject: Re: Geting the value of a top level scheme value from C
Date: Fri, 24 Jan 2014 12:06:48 -0500

On Fri, Jan 24, 2014 at 11:54 AM, Richard Shann <address@hidden> wrote:
> Given a C string that is the name of a Scheme variable what is the call
> I need to make from C to get the value?
>
> That is, in the Scheme I have
>
> (define foo "bar")
>
> Then in C I want to write
>
> SCM bar = scm_var_c_get_val ("foo");//imaginary function name
>
> strcmp ("bar", scm_to_locale_string (bar));
>
> etc...
>
> Richard Shann

Hello Richard,

I think 'scm_public_ref' is what you want.

See the manual for further explanation and other procedures in case I
picked the wrong one. ;)

http://www.gnu.org/software/guile/manual/html_node/Accessing-Modules-from-C.html#Accessing-Modules-from-C

- Dave



reply via email to

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