This diff changes the code for selecting a default enum value to always choose the field assigned to zero. It's not always correct to choose the default field by comparing the ERL_NIF_TERMs for the field names because this depends on the order the atoms were first used. This isn't a major change, but should reduce the potential for strange bugs. Thanks!
This diff changes the code for selecting a default enum value to always choose the field assigned to zero. It's not always correct to choose the default field by comparing the
ERL_NIF_TERM
s for the field names because this depends on the order the atoms were first used. This isn't a major change, but should reduce the potential for strange bugs. Thanks!