diff options
author | Pedro Alves <palves@redhat.com> | 2015-02-27 16:33:07 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-02-27 16:33:07 +0000 |
commit | fe978cb071b460b2d4aed2f9a71d895f84efce0e (patch) | |
tree | 65d107663745fc7872e680feea9ec2fa6a4949ad /gdb/jv-exp.y | |
parent | 3bc3d82a005466a66fa22f704c90f4486ca71344 (diff) | |
download | gdb-fe978cb071b460b2d4aed2f9a71d895f84efce0e.zip gdb-fe978cb071b460b2d4aed2f9a71d895f84efce0e.tar.gz gdb-fe978cb071b460b2d4aed2f9a71d895f84efce0e.tar.bz2 |
C++ keyword cleanliness, mostly auto-generated
This patch renames symbols that happen to have names which are
reserved keywords in C++.
Most of this was generated with Tromey's cxx-conversion.el script.
Some places where later hand massaged a bit, to fix formatting, etc.
And this was rebased several times meanwhile, along with re-running
the script, so re-running the script from scratch probably does not
result in the exact same output. I don't think that matters anyway.
gdb/
2015-02-27 Tom Tromey <tromey@redhat.com>
Pedro Alves <palves@redhat.com>
Rename symbols whose names are reserved C++ keywords throughout.
gdb/gdbserver/
2015-02-27 Tom Tromey <tromey@redhat.com>
Pedro Alves <palves@redhat.com>
Rename symbols whose names are reserved C++ keywords throughout.
Diffstat (limited to 'gdb/jv-exp.y')
-rw-r--r-- | gdb/jv-exp.y | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y index 653eb81..2ed1c17 100644 --- a/gdb/jv-exp.y +++ b/gdb/jv-exp.y @@ -842,7 +842,7 @@ parse_number (struct parser_state *par_state, struct token { - char *operator; + char *oper; int token; enum exp_opcode opcode; }; @@ -896,7 +896,7 @@ yylex (void) tokstart = lexptr; /* See if it is a special token of length 3. */ for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++) - if (strncmp (tokstart, tokentab3[i].operator, 3) == 0) + if (strncmp (tokstart, tokentab3[i].oper, 3) == 0) { lexptr += 3; yylval.opcode = tokentab3[i].opcode; @@ -905,7 +905,7 @@ yylex (void) /* See if it is a special token of length 2. */ for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++) - if (strncmp (tokstart, tokentab2[i].operator, 2) == 0) + if (strncmp (tokstart, tokentab2[i].oper, 2) == 0) { lexptr += 2; yylval.opcode = tokentab2[i].opcode; @@ -1461,21 +1461,21 @@ static struct expression * copy_exp (struct expression *expr, int endpos) { int len = length_of_subexp (expr, endpos); - struct expression *new - = (struct expression *) malloc (sizeof (*new) + EXP_ELEM_TO_BYTES (len)); + struct expression *newobj + = (struct expression *) malloc (sizeof (*newobj) + EXP_ELEM_TO_BYTES (len)); - new->nelts = len; - memcpy (new->elts, expr->elts + endpos - len, EXP_ELEM_TO_BYTES (len)); - new->language_defn = 0; + newobj->nelts = len; + memcpy (newobj->elts, expr->elts + endpos - len, EXP_ELEM_TO_BYTES (len)); + newobj->language_defn = 0; - return new; + return newobj; } /* Insert the expression NEW into the current expression (expout) at POS. */ static void -insert_exp (struct parser_state *par_state, int pos, struct expression *new) +insert_exp (struct parser_state *par_state, int pos, struct expression *newobj) { - int newlen = new->nelts; + int newlen = newobj->nelts; int i; /* Grow expout if necessary. In this function's only use at present, @@ -1485,7 +1485,7 @@ insert_exp (struct parser_state *par_state, int pos, struct expression *new) for (i = par_state->expout_ptr - 1; i >= pos; i--) par_state->expout->elts[i + newlen] = par_state->expout->elts[i]; - memcpy (par_state->expout->elts + pos, new->elts, + memcpy (par_state->expout->elts + pos, newobj->elts, EXP_ELEM_TO_BYTES (newlen)); par_state->expout_ptr += newlen; } |