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:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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];
|
||||
|
||||
|
Reference in New Issue
Block a user