[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile's eval from C
From: |
Neil Jerram |
Subject: |
Re: guile's eval from C |
Date: |
30 Sep 2002 19:38:38 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>>>> "Viktor" == Viktor Pavlenko <address@hidden> writes:
Viktor> Hello and sorry for the simple question.
Viktor> I'd like to evaluate an SCM object from C, equivalent to
guile> (eval '(car '("a" "b" "c")))
Viktor> "a"
guile> (eval "a")
Viktor> "a"
Viktor> Looks like the best way is to call gh_call1(), but how do
Viktor> I get an SCM object for guile's eval? I could also build a
Viktor> C string containing the complete expression to be
Viktor> evaluated ( "(eval '(car '("a" "b" "c")))" ) and call
Viktor> gh_eval_str() but this seems inefficient because I have
Viktor> the expression to be evaluated as SCM object.
One possibility is:
scm_primitive_eval (exp);
This will evaluate the supplied expression in the current module.
Does this help?
Neil