1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Add some const decorations to prototypes

Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
This commit is contained in:
Peter Eisentraut
2017-10-31 10:34:31 -04:00
parent 7e60e67861
commit 0e1539ba0d
95 changed files with 236 additions and 236 deletions

View File

@@ -70,7 +70,7 @@ compare_syn(const void *a, const void *b)
}
static void
read_dictionary(DictSyn *d, char *filename)
read_dictionary(DictSyn *d, const char *filename)
{
char *real_filename = get_tsearch_config_filename(filename, "rules");
tsearch_readline_state trst;

View File

@@ -232,7 +232,7 @@ metastring;
*/
static metastring *
NewMetaString(char *init_str)
NewMetaString(const char *init_str)
{
metastring *s;
char empty_string[] = "";
@@ -375,7 +375,7 @@ StringAt(metastring *s, int start, int length,...)
static void
MetaphAdd(metastring *s, char *new_str)
MetaphAdd(metastring *s, const char *new_str)
{
int add_length;

View File

@@ -47,7 +47,7 @@ PG_MODULE_MAGIC;
/* private stuff */
typedef int (*PFN) (const char *name, void **res);
static void *find_provider(text *name, PFN pf, char *desc, int silent);
static void *find_provider(text *name, PFN pf, const char *desc, int silent);
/* SQL function: hash(bytea, text) returns bytea */
PG_FUNCTION_INFO_V1(pg_digest);
@@ -474,7 +474,7 @@ pg_random_uuid(PG_FUNCTION_ARGS)
static void *
find_provider(text *name,
PFN provider_lookup,
char *desc, int silent)
const char *desc, int silent)
{
void *res;
char *buf;

View File

@@ -1052,9 +1052,9 @@ restore(char *result, float val, int n)
* a floating point number
*/
int
significant_digits(char *s)
significant_digits(const char *s)
{
char *p = s;
const char *p = s;
int n,
c,
zeroes;

View File

@@ -12,7 +12,7 @@ typedef struct SEG
} SEG;
/* in seg.c */
extern int significant_digits(char *str);
extern int significant_digits(const char *str);
/* in segscan.l */
extern int seg_yylex(void);

View File

@@ -21,7 +21,7 @@
#define YYMALLOC palloc
#define YYFREE pfree
static float seg_atof(char *value);
static float seg_atof(const char *value);
static char strbuf[25] = {
'0', '0', '0', '0', '0',
@@ -151,7 +151,7 @@ deviation: SEGFLOAT
static float
seg_atof(char *value)
seg_atof(const char *value)
{
Datum datum;

View File

@@ -90,7 +90,7 @@ placeChar(TrieChar *node, const unsigned char *str, int lenstr,
* Function converts UTF8-encoded file into current encoding.
*/
static TrieChar *
initTrie(char *filename)
initTrie(const char *filename)
{
TrieChar *volatile rootTrie = NULL;
MemoryContext ccxt = CurrentMemoryContext;

View File

@@ -253,7 +253,7 @@ uuid_generate_v35_internal(int mode, pg_uuid_t *ns, text *name)
#else /* !HAVE_UUID_OSSP */
static Datum
uuid_generate_internal(int v, unsigned char *ns, char *ptr, int len)
uuid_generate_internal(int v, unsigned char *ns, const char *ptr, int len)
{
char strbuf[40];