[erlang-patches] Some bugfixes in ei_x_format in R13B02-1
Fri Oct 9 17:43:10 CEST 2009
Thank your for pointing out these issues and supplying a patch for it.
I will have a look at it as soon as I can.
christopher faulet wrote:
> Hi all,
> the attached patch fixes some bugs in functions that build terms from
> strings, called by ei_x_format and ei_x_format_wo_ver. It improves the
> parsing of lists, tuples, strings, atoms and digits. The file test_ei.c
> in attachement shows examples that ei_x_format doesn't parse correctly.
> In addition, I added support of hexadecimal representations of digit.
> This patch also fixes a bug in erl_call. When we use the option "-a 'Mod
> Fun Args'", the module and function are extracted and the remainings are
> passed to ei_x_format_wo_ver in order to build arguments before calling
> the function ei_rpc. The problem is that this function tries to replace
> all ~a,~s,~i... But in this context, it's a mistake. To avoid this
> behaviour, I added a new function, ei_x_parse, that transforms a string
> in erlang term without any replacement. Here is an example:
> * the following command returns an error instead of ["test"]:
> erl_call -sname bug_ei -s -a 'io_lib format ["~p", [test]]'
> I only tested this patch on linux but I hope that it works on other OS.
> Best regards,
More information about the erlang-patches