guile-devel
[Top][All Lists]
Advanced

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

Re: unknown location: definition in expression context in subform optnam


From: Mike Gran
Subject: Re: unknown location: definition in expression context in subform optname-from of "_^"
Date: Sun, 29 Jan 2012 10:06:15 -0800 (PST)

> From: Bruce Korb <address@hidden>

> On Sat, Jan 28, 2012 at 8:12 PM, Mark H Weaver <address@hidden> 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




reply via email to

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