On 8/26/07, Scott McKellar <[EMAIL PROTECTED]> wrote: > This patch adds const qualifiers to the parameters of a couple of > functions: the global function jsonObjectEncodeClass() and the > underlying static function _jsonObjectEncodeClass(). A companion patch > updates the prototype in the corresponding header file. > > The _jsonObjectEncodeClass function does not change the contents of the > jsonObject upon which it operates; rather it creates a new jsonObject > derived from the original. Hence it can accept a const pointer in > good conscience, as can its wrapper function jsonObjectEncodeClass(). > > This patch will not change the behavior of anything. However it will > enable us to remove at least one cast (in jsonObjectToJSON()) that is > present solely to remove constness. Casts in general are > unfashionable, > and a cast that removes constness is likely to raise eyebrows, even if > (as in this case) it turns out to be benign.
Agreed, and committed. Thank you, sir. -- Mike Rylander Equinox Software, Inc [EMAIL PROTECTED] http://esilibrary.com/
