From 8171716ae9ffd87f26a98a77d9811f4654646f73 Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 13 Oct 2021 00:14:05 +0100 Subject: [PATCH] Added "object" as a reserved name for PHP (#8962) * Added "object" as a reserved name for PHP * Fixed spacing --- php/ext/google/protobuf/names.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/php/ext/google/protobuf/names.c b/php/ext/google/protobuf/names.c index 6108ff4a0d9b..a99188800df0 100644 --- a/php/ext/google/protobuf/names.c +++ b/php/ext/google/protobuf/names.c @@ -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;