psql: Remove inappropriate const qualifiers
Since mbvalidate() can alter the string it validates, having the callers claim that the strings they accept are const is inappropriate.
This commit is contained in:
parent
359dea2859
commit
598bb8cdbd
|
@ -385,7 +385,7 @@ unsigned char *
|
||||||
mbvalidate(unsigned char *pwcs, int encoding)
|
mbvalidate(unsigned char *pwcs, int encoding)
|
||||||
{
|
{
|
||||||
if (encoding == PG_UTF8)
|
if (encoding == PG_UTF8)
|
||||||
mb_utf_validate((unsigned char *) pwcs);
|
mb_utf_validate(pwcs);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2122,7 +2122,7 @@ printTableInit(printTableContent *const content, const printTableOpt *opt,
|
||||||
* column.
|
* column.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
printTableAddHeader(printTableContent *const content, const char *header,
|
printTableAddHeader(printTableContent *const content, char *header,
|
||||||
const bool translate, const char align)
|
const bool translate, const char align)
|
||||||
{
|
{
|
||||||
#ifndef ENABLE_NLS
|
#ifndef ENABLE_NLS
|
||||||
|
@ -2162,7 +2162,7 @@ printTableAddHeader(printTableContent *const content, const char *header,
|
||||||
* Note: Automatic freeing of translatable strings is not supported.
|
* Note: Automatic freeing of translatable strings is not supported.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
printTableAddCell(printTableContent *const content, const char *cell,
|
printTableAddCell(printTableContent *const content, char *cell,
|
||||||
const bool translate, const bool mustfree)
|
const bool translate, const bool mustfree)
|
||||||
{
|
{
|
||||||
#ifndef ENABLE_NLS
|
#ifndef ENABLE_NLS
|
||||||
|
|
|
@ -162,9 +162,9 @@ extern void printTableInit(printTableContent *const content,
|
||||||
const printTableOpt *opt, const char *title,
|
const printTableOpt *opt, const char *title,
|
||||||
const int ncolumns, const int nrows);
|
const int ncolumns, const int nrows);
|
||||||
extern void printTableAddHeader(printTableContent *const content,
|
extern void printTableAddHeader(printTableContent *const content,
|
||||||
const char *header, const bool translate, const char align);
|
char *header, const bool translate, const char align);
|
||||||
extern void printTableAddCell(printTableContent *const content,
|
extern void printTableAddCell(printTableContent *const content,
|
||||||
const char *cell, const bool translate, const bool mustfree);
|
char *cell, const bool translate, const bool mustfree);
|
||||||
extern void printTableAddFooter(printTableContent *const content,
|
extern void printTableAddFooter(printTableContent *const content,
|
||||||
const char *footer);
|
const char *footer);
|
||||||
extern void printTableSetFooter(printTableContent *const content,
|
extern void printTableSetFooter(printTableContent *const content,
|
||||||
|
|
Loading…
Reference in New Issue