Subject: [PATCH] Make pointed-to ares_options data const

[PATCH] Make pointed-to ares_options data const

From: Brad Spencer <spencer_at_jacknife.org>
Date: Wed, 16 May 2007 22:28:57 -0300

It seems that all the pointed-to data in ares_options is copied when
ares_init_options is called. So, it would seem to be best if the
pointers in the ares_options structure pointed to constant data so I
can write something like this without breaking any const rules (at
least in C++; I'm not sure what the current C rules are):

  // Should be okay to pass type "const char *" here since
  // copied anyway.
  options.lookups = "bf";

(BTW, this and my previous patch were against c-ares-1.3.1.)

-- 
----------------------------------------------------------
Brad Spencer - spencer@jacknife.org - http://jacknife.org/

Received on 2007-05-17