[erlang-questions] need to call erl_init_marshal () ?
Paul Mineiro
paul-trapexit@REDACTED
Sat May 31 20:43:57 CEST 2008
re: erl_compare_ext () to compare binaries in erlang term order in a
linked-in driver.
i got this working but it was very tricky, basically calling erl_init ()
from a linked-in driver does not work, but otherwise erl_compare_ext () is
silently broken, not in a crashing way, but in a "i claim to be a
comparison function but i'm not antisymmetric" way, which leads to bizarre
behaviour when used as the comparison function for tree lookup.
it turns out the thing to call is erl_init_marshal (), which is not
exported in any header so you have to declare it yourself (extern) and
then call it from the init hook of your linked-in driver. and to know
that, you'd have to crawl through source code (or maybe now, find this
message via search engine).
is there a better way?
thanks,
-- p
More information about the erlang-questions
mailing list