The encoder_hook feature allows for arbitrary python code to be called while an ErlangTermEncoder assumes that it is able to muck with its memory at will. This is usually fine, but if someone were to attempt to pack something with the same encoder instance, it would clobber the previous encoding attempt. We track this situation with a flag and bail out loudly in this situation.
The encoder_hook feature allows for arbitrary python code to be called while an ErlangTermEncoder assumes that it is able to muck with its memory at will. This is usually fine, but if someone were to attempt to pack something with the same encoder instance, it would clobber the previous encoding attempt. We track this situation with a flag and bail out loudly in this situation.