unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: RFD: add an interface scm_c_eval_string_from_file_line
Date: Mon, 22 Sep 2008 22:09:55 +0200	[thread overview]
Message-ID: <8763oo6iy4.fsf@gnu.org> (raw)
In-Reply-To: 668c430c0809220858p1382a21bx702193f7a498ff13@mail.gmail.com

Hi,

"Bruce Korb" <bruce.korb@gmail.com> writes:

> On Mon, Sep 22, 2008 at 8:16 AM, Ludovic Courtès <ludo@gnu.org> 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?

Yes.

>> 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.

Thanks,
Ludo'.





      reply	other threads:[~2008-09-22 20:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22 15:58 RFD: add an interface scm_c_eval_string_from_file_line Bruce Korb
2008-09-22 20:09 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763oo6iy4.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).