On Mon, 2025-05-05 at 16:23 +0200, Mikael Djurfeldt wrote:
> Hi Basile,
> 
> You're right that the string needs to be parsed into an s-expression before
> being evaluated. You have:
> 
> SCM guilexp = scm_from_utf8_string(optarg);
> SCM resguile = scm_primitive_eval(guilexp);
> 
> The first call converts the C string into a Scheme string. But the step which
> parses the string is missing. So, the eval will end up evaluating the string
> to itself.
> 
> Try replacing scm_from_utf8_string with scm_c_read_string.


Thanks a big lot that solved my issue

-- 
Basile STARYNKEVITCH                            <bas...@starynkevitch.net>
8 rue de la Faïencerie                       http://starynkevitch.net/Basile/  
92340 Bourg-la-Reine                         https://github.com/bstarynk
France                                https://github.com/RefPerSys/RefPerSys

Reply via email to