This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA v2 06/17] Remove cleanup_iconv


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]