[erlang-questions] c-node and arbitrary erlang term
Per Hedeland
per@REDACTED
Mon Aug 3 22:26:51 CEST 2009
Roberto Ostinelli <roberto@REDACTED> wrote:
>
>however, since the string "[{one, 1}, {two, 2}]" is already in erlang
>format, i read from erl_format specs <http://erlang.org/documentation/doc-5.5.3/lib/erl_interface-3.5.5.3/doc/html/erl_format.html
> > that i could use:
>
>~w - Arbitrary Erlang term
>
>however, if i change in the above code the line to:
>
>erlterm = erl_format("~w", e_headers);
>
>i get a bus error and my c-node crashes.
See the example just below in the doc - the argument corresponding to ~w
should be an ETERM* - erl_interface does not include a full-blown Erlang
parser.:-)
>i could of course parse the string and re-build an erlang term from
>the incomed string, however this is obviously something i want to
>avoid. what am i missing?
Sending it as a string to the Erlang node and parsing it there?
--Per Hedeland
More information about the erlang-questions
mailing list