Misleading description of 'flags' parameter for idn2_to_unicode_*()
All idn2_to_unicode_*()
functions take a flags
parameter, which they always ultimately pass down to idn2_to_unicode_8z4z()
.
Even though idn2_to_unicode_8z4z()
documentation says:
* @flags: optional #idn2_flags to modify behaviour.
the prototype of that function clearly shows that the flags
parameter is unused:
int
idn2_to_unicode_8z4z (const char * input, uint32_t ** output, G_GNUC_UNUSED int flags)
This might mislead users of other idn2_to_unicode_*()
functions to believe that flags
can be used to request certain checks, e.g.:
idn2_to_unicode_8zlz(..., ..., IDN2_NFC_INPUT|IDN2_NONTRANSITIONAL);
which is obviously not the case.
IMHO commit 8c3d4f81 should never have touched lib/decode.c
.
The optimal solution to this issue would be to actually make idn2_to_unicode_8z4z()
react to non-zero flags
, but for the time being I would say at least a quick documentation fix is in order to prevent confusion.