[Top][All Lists]

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

Re: RFD: add an interface scm_c_eval_string_from_file_line

From: Ludovic Courtès
Subject: Re: RFD: add an interface scm_c_eval_string_from_file_line
Date: Mon, 22 Sep 2008 22:09:55 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)


"Bruce Korb" <address@hidden> writes:

> On Mon, Sep 22, 2008 at 8:16 AM, Ludovic Courtès <address@hidden> wrote:
>>>         SCM  expr  = scm_makfrom0str( pzExpr );
>> That's deprecated as of 1.8, use `scm_from_locale_string ()'.
> This is used iff Guile antedates 1.6.  I guess that can be junked now?


>> Anyway, why not just use `scm_c_eval_string ()'?  It'd be really safer
>> than "rolling your own".
> Because the strings are extracted from large text files and it is important
> that the error message reveal the correct file and line number.  It is
> precisely because of the issues with cruft like using internal Guile
> structures that I'd be so extremely happy to (finally) see a a proper export 
> of:
>   scm_c_eval_string_from_file_line(SCM string, SCM file, SCM line)
> Then for GUILE_VERSION >= 109000 I could just #define my variation
> to the Proper Call.  :)

Hmm, the port "API" is really one of the least pleasant parts of Guile.
:-) The issue, as you notice, is that it exposes a lot of internals and
is quite inconvenient.

Actually, now that I read it again, your code for GUILE_VERSION >= 107000 
doesn't look that terrific---it's the compatibility code for 1.6 that's
quite hard to read.


reply via email to

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