Serialization of EFunHandler function objects isn't implemented #48

eriksoe opened this Issue Jan 25, 2011 · 4 comments


None yet

3 participants

eriksoe commented Jan 25, 2011

==== To reproduce:
1> erlang:term_to_binary(fun erlang:is_lt/2).

=== Observed behaviour:
** exception error: {not_implemented,"Encode for erjang.EFunHandler2",
in function term_to_binary/1

edwardw commented Jun 18, 2011

But it does work for existing functions, such as:

But I can't figure out why it only fails for non-existing functions.

edwardw commented Jun 20, 2011

I think I've figured this out. In order to implement erjang.EObject$encode method for ejang.EFunHandler, we need something similar to erjang.EFun$make_encode_method_for_exported and add it to erjang.EFun$get_fun_with_handler. It seems to be impossible because we don't know module and function name of certain EFunHandler instance unless its invoke method has been, well, invoked.

If such observation is true, I think this issue can't be solved.

edwardw commented Jun 22, 2011



Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment