Re: [RFA v2 06/17] Remove cleanup_iconv

Pedro Alves
2017-04-12T11:19:57Z

On 04/11/2017 04:01 PM, Tom Tromey wrote:
> + iconv_wrapper (const char *from, const char *to)
> + {
> + m_desc = iconv_open (to, from);

...

> - desc = iconv_open (to, from);
> - if (desc == (iconv_t) -1)
> - perror_with_name (_("Converting character sets"));
> - cleanups = make_cleanup (cleanup_iconv, &desc);
> + iconv_wrapper desc (from, to);
>

I find the inversion of the order of "from" and "to" potentially
confusing/misleading, given this is a "wrapper" class. Is there a
rationale behind the swap?

Thanks,
Pedro Alves