-
Guilhem Bichot authored
During development in a feature tree, when adding one function which took a "const CHARSET_INFO *" parameter and passed it to String::set_charset(), it appears that String::set_charset() has only a CHARSET_INFO* parameter, causing a compilation problem. In the present patch, we change String::set_charset() to accept "const CHARSET_INFO*" instead. Thus String::charset() has to return this type too. As the return value of String::charset() is used as parameter in calls to constructors of Field descendants, those constructors have to accept "const CHARSET_INFO*" instead of CHARSET_INFO*. The patch fixes all those "dependencies". After it, "const CHARSET_INFO*" is more frequent in code than "CHARSET_INFO*", which is normal as most code needn't update the content of any CHARSET_INFO structure. This now gives the charset-managing code guarantees that users of charsets won't change their content. Copyrights are updated to match recommendations: last year = 2011; Oracle; but also (c) (not (C)), and the correct FSF address (Franklin Street, and FSF has "Inc.").
Guilhem Bichot authoredDuring development in a feature tree, when adding one function which took a "const CHARSET_INFO *" parameter and passed it to String::set_charset(), it appears that String::set_charset() has only a CHARSET_INFO* parameter, causing a compilation problem. In the present patch, we change String::set_charset() to accept "const CHARSET_INFO*" instead. Thus String::charset() has to return this type too. As the return value of String::charset() is used as parameter in calls to constructors of Field descendants, those constructors have to accept "const CHARSET_INFO*" instead of CHARSET_INFO*. The patch fixes all those "dependencies". After it, "const CHARSET_INFO*" is more frequent in code than "CHARSET_INFO*", which is normal as most code needn't update the content of any CHARSET_INFO structure. This now gives the charset-managing code guarantees that users of charsets won't change their content. Copyrights are updated to match recommendations: last year = 2011; Oracle; but also (c) (not (C)), and the correct FSF address (Franklin Street, and FSF has "Inc.").
Loading