Skip to content

Commit

Permalink
Added "object" as a reserved name for PHP (#8962)
Browse files Browse the repository at this point in the history
* Added "object" as a reserved name for PHP

* Fixed spacing
  • Loading branch information
J0sh0nat0r authored Oct 12, 2021
1 parent 0da2ca5 commit 8171716
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions php/ext/google/protobuf/names.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,22 @@ static void stringsink_uninit(stringsink *sink) { free(sink->ptr); }
/* def name -> classname ******************************************************/

const char *const kReservedNames[] = {
"abstract", "and", "array", "as", "break",
"callable", "case", "catch", "class", "clone",
"const", "continue", "declare", "default", "die",
"do", "echo", "else", "elseif", "empty",
"enddeclare", "endfor", "endforeach", "endif", "endswitch",
"endwhile", "eval", "exit", "extends", "final",
"finally", "fn", "for", "foreach", "function",
"if", "implements", "include", "include_once", "instanceof",
"global", "goto", "insteadof", "interface", "isset",
"list", "match", "namespace", "new", "or",
"print", "private", "protected", "public", "require",
"require_once", "return", "static", "switch", "throw",
"trait", "try", "unset", "use", "var",
"while", "xor", "yield", "int", "float",
"bool", "string", "true", "false", "null",
"void", "iterable", NULL};
"abstract", "and", "array", "as", "break",
"callable", "case", "catch", "class", "clone",
"const", "continue", "declare", "default", "die",
"do", "echo", "else", "elseif", "empty",
"enddeclare", "endfor", "endforeach", "endif", "endswitch",
"endwhile", "eval", "exit", "extends", "final",
"finally", "fn", "for", "foreach", "function",
"if", "implements", "include", "include_once", "instanceof",
"global", "goto", "insteadof", "interface", "isset",
"list", "match", "namespace", "new", "object",
"or", "print", "private", "protected", "public",
"require", "require_once", "return", "static", "switch",
"throw", "trait", "try", "unset", "use",
"var", "while", "xor", "yield", "int",
"float", "bool", "string", "true", "false",
"null", "void", "iterable", NULL};

bool is_reserved_name(const char* name) {
int i;
Expand Down

0 comments on commit 8171716

Please sign in to comment.