> From: Bruce Korb <bruce.k...@gmail.com> > On Sat, Jan 28, 2012 at 8:12 PM, Mark H Weaver <m...@netris.org> wrote: >> In short, this single function allows code to do the ideal thing >> relatively painlessly. Typical usage might be something like this: >> >> SCM >> my_eval (const char *string, const char *file_name, >> long line, long column) >> { >> return scm_eval_string_from_file >> (scm_from_locale_string (string), SCM_UNDEFINED, >> scm_from_locale_string (file_name), line, column, 0); >> } >> >> What do you think? > > I think it is what I've wanted for years. Thank you!! > Any of these variations would make me happy.
FWIW, looking at Andy's C functions that call eval-string, they seem simple enough. But I never would have come up with that on my own. When I'm doing C, I tend to focus on C API. I'm agnostic on whether there should be a new C function for this, but, if there isn't, the code from http://lists.gnu.org/archive/html/guile-devel/2011-03/msg00091.html should make its way into the manual as a reminder that you can do better than scm_c_eval_string. Thanks, Mike