mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #25923: Added more const qualifiers to signatures of static and private functions.
This commit is contained in:
parent
2d06e84455
commit
ef1585eb9a
60 changed files with 210 additions and 191 deletions
|
@ -379,7 +379,7 @@ typedef struct _ss_dfa {
|
|||
|
||||
/* Forward */
|
||||
static void printssdfa(int xx_nstates, ss_state *xx_state, int nbits,
|
||||
labellist *ll, char *msg);
|
||||
labellist *ll, const char *msg);
|
||||
static void simplify(int xx_nstates, ss_state *xx_state);
|
||||
static void convert(dfa *d, int xx_nstates, ss_state *xx_state);
|
||||
|
||||
|
@ -494,7 +494,7 @@ makedfa(nfagrammar *gr, nfa *nf, dfa *d)
|
|||
|
||||
static void
|
||||
printssdfa(int xx_nstates, ss_state *xx_state, int nbits,
|
||||
labellist *ll, char *msg)
|
||||
labellist *ll, const char *msg)
|
||||
{
|
||||
int i, ibit, iarc;
|
||||
ss_state *yy;
|
||||
|
|
|
@ -27,7 +27,7 @@ int Py_VerboseFlag;
|
|||
int Py_IgnoreEnvironmentFlag;
|
||||
|
||||
/* Forward */
|
||||
grammar *getgrammar(char *filename);
|
||||
grammar *getgrammar(const char *filename);
|
||||
|
||||
void Py_Exit(int) _Py_NO_RETURN;
|
||||
|
||||
|
@ -76,7 +76,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
|
||||
grammar *
|
||||
getgrammar(char *filename)
|
||||
getgrammar(const char *filename)
|
||||
{
|
||||
FILE *fp;
|
||||
node *n;
|
||||
|
|
|
@ -202,8 +202,8 @@ error_ret(struct tok_state *tok) /* XXX */
|
|||
}
|
||||
|
||||
|
||||
static char *
|
||||
get_normal_name(char *s) /* for utf-8 and latin-1 */
|
||||
static const char *
|
||||
get_normal_name(const char *s) /* for utf-8 and latin-1 */
|
||||
{
|
||||
char buf[13];
|
||||
int i;
|
||||
|
@ -264,7 +264,7 @@ get_coding_spec(const char *s, char **spec, Py_ssize_t size, struct tok_state *t
|
|||
|
||||
if (begin < t) {
|
||||
char* r = new_string(begin, t - begin, tok);
|
||||
char* q;
|
||||
const char* q;
|
||||
if (!r)
|
||||
return 0;
|
||||
q = get_normal_name(r);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue