[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reprise: scm_c_eval_string_from_file_line
From: |
Andy Wingo |
Subject: |
Re: reprise: scm_c_eval_string_from_file_line |
Date: |
Tue, 08 Mar 2011 23:52:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
On Tue 08 Mar 2011 23:45, Bruce Korb <address@hidden> writes:
> So, this should go under:
> #if GUILE_VERSION > 200000 // anything after 2.0, e.g. 2.0.1 ??
Yes, I think that's right.
>> return scm_call_5 (scm_variable_ref (eval_string_var),
>> string,
>
> Wouldn't this arg need to be SCM-ized? viz. scm_from_locale_string
> (string)
Indeed; though you should think about encodings here. There is also
scm_from_utf8_string and scm_from_latin1_string, and there will soon be
scm_from_latin1_keyword which is likely preferable to
scm_from_locale_keyword in this case.
> I guess I'll need to read docs. From this sentence, I'd be guessing
> that I'd need to use "scm_call_7" and add:
> scm_from_locale_keyword("#:compile?"), scm_from_locale_keyword("#t"),
^ SCM_BOOL_T, of course.
> to the arg list. I think you just added scm_call_5 for this purpose.
Indeed, though there is not a scm_call_7 yet :P You can always use the
scm_apply family, or build up an array and use scm_call_n.
Cheers,
Andy
--
http://wingolog.org/