[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile's eval from C
From: |
Viktor Pavlenko |
Subject: |
Re: guile's eval from C |
Date: |
Mon, 30 Sep 2002 15:36:28 -0400 |
>>>>> "NJ" == Neil Jerram <address@hidden> writes:
>>>>> "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.
NJ> One possibility is:
NJ> scm_primitive_eval (exp);
NJ> This will evaluate the supplied expression in the current module.
NJ> Does this help?
I believe it will when I switch to 1.6. Thanks!
Viktor