I'm porting existing code that is embedding racket and I'm going from 
racket-bc to racket-cs.

In racket-bc, the code is calling scheme_eval_string() and 
scheme_eval_string_all().

I don't see a direct replacement for these functions in racket-cs.  Based 
on the embedding example in the docs, I'm currently using the following:

void EvalString(const std::string& str)
{
    ptr expr = to_bytevector(str.c_str());
    expr = Scons(Sstring_to_symbol("open-input-bytes"), Scons(expr, Snil));
    expr = Scons(Sstring_to_symbol("read"), Scons(expr, Snil));
    expr = Scons(Sstring_to_symbol("eval"), Scons(expr, Snil));
    racket_eval(expr);
}

Would this be equivalent?  And also equivalent to scheme_eval_string_all() ?
--< Dan >--

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/dd305eab-d483-413b-a6cb-d240d6b3189dn%40googlegroups.com.

Reply via email to