unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Mike Gran <spk121@yahoo.com>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: scm_c_eval_string and filename
Date: Wed, 29 Jul 2015 16:29:43 -0400	[thread overview]
Message-ID: <87d1zavhag.fsf@netris.org> (raw)
In-Reply-To: <1031352713.2029292.1436462076745.JavaMail.yahoo@mail.yahoo.com> (Mike Gran's message of "Thu, 9 Jul 2015 17:14:36 +0000 (UTC)")

Hi Mike,

Sorry for the slow response.

Mike Gran <spk121@yahoo.com> writes:
> Question: if I'm reading in some Guile code using the
> C API scm_c_eval_string, can I set a fake "filename"
> so that it gets added as a source property to the
> contents read in as a string?

AFAIK, we don't have an existing C API for that, but if you look at the
definition of 'scm_c_eval_string' in strports.c, you'll see that it is
just a wrapper around 'eval-string' in (ice-9 eval-string), which itself
can accept 'file', 'line', and 'column' arguments.  So, the easiest
solution for you is to make your own wrapper around 'eval-string' that
passes those arguments.

     Mark



      reply	other threads:[~2015-07-29 20:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 17:14 scm_c_eval_string and filename Mike Gran
2015-07-29 20:29 ` Mark H Weaver [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=87d1zavhag.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guile-user@gnu.org \
    --cc=spk121@yahoo.com \
    /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).