guile-user
[Top][All Lists]
Advanced

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

guile's eval from C


From: Viktor Pavlenko
Subject: guile's eval from C
Date: Sun, 29 Sep 2002 16:55:50 -0400

Hello and sorry for the simple question.

I'd like to evaluate an SCM object from C, equivalent to

guile> (eval '(car '("a" "b" "c")))
"a"
guile> (eval "a")
"a"

Looks like the best way is to call gh_call1(), but how do I get an SCM
object for guile's eval? I could also build a C string containing the
complete expression to be evaluated ( "(eval '(car '("a" "b" "c")))" )
and call gh_eval_str() but this seems inefficient because I have the
expression to be evaluated as SCM object.

Thank you in advance.

Viktor




reply via email to

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