guile-user
[Top][All Lists]
Advanced

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

Re: scm_c_eval_string and filename


From: Mark H Weaver
Subject: Re: scm_c_eval_string and filename
Date: Wed, 29 Jul 2015 16:29:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi Mike,

Sorry for the slow response.

Mike Gran <address@hidden> 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 via email to

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