[Ecls-list] ecl_read_from_cstring() and ecl_read_from_cstring_safe() don't work

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Tue Aug 18 10:00:34 UTC 2009


On Tue, Aug 18, 2009 at 11:25 AM, Kamil Shakirov<kamils80 at gmail.com> wrote:
> In the latest ECL 9.8.x the function c_string_to_object(s) was replaced
> with ecl_read_from_cstring(S) and ecl_read_from_cstring_safe(S, V)
> macros.

Yes, the intention is that there is the possibility to signal errors
and not just ignore them.

> I tested my app with the latest CVS HEAD and found that with the correct
> input expression, ecl_read_from_cstring(S) returns a cl_object that
> can't be evaluated with si_safe_eval() and ecl_read_from_cstring_safe(S,
> V) always return V. c_string_to_object(S) works as expected in 9.7.x.

I would say that is impossible because c_string_to_object is just an
alias for ecl_read_from_string. From ecl/src/h/external.h

#define ecl_read_from_cstring(s)
si_string_to_object(1,make_constant_base_string(s))
#define ecl_read_from_cstring_safe(s,v)
si_string_to_object(2,make_constant_base_string(s),(v))
#define c_string_to_object ecl_read_from_cstring

Could you print the output of ecl_read_from_cstring() ? Does
si_string_to_object get called when you use c_string_to_object() ?

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list