Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e00b4f7

Browse files
committed
Remove redundant JSON parser typedefs
JsonNonTerminal and JsonParserSem were added in commit 3311ea8 These names of these two enums are not actually used, so there is no need for typedefs. Instead use plain enums to declare the constants. Noticed by Alvaro Herera.
1 parent ed52df3 commit e00b4f7

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/common/jsonapi.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ typedef enum /* contexts of JSON parser */
5050
* tokens, non-terminals, and semantic action markers.
5151
*/
5252

53-
typedef enum
53+
enum JsonNonTerminal
5454
{
5555
JSON_NT_JSON = 32,
5656
JSON_NT_ARRAY_ELEMENTS,
5757
JSON_NT_MORE_ARRAY_ELEMENTS,
5858
JSON_NT_KEY_PAIRS,
5959
JSON_NT_MORE_KEY_PAIRS,
60-
} JsonNonTerminal;
60+
};
6161

62-
typedef enum
62+
enum JsonParserSem
6363
{
6464
JSON_SEM_OSTART = 64,
6565
JSON_SEM_OEND,
@@ -72,7 +72,7 @@ typedef enum
7272
JSON_SEM_AELEM_END,
7373
JSON_SEM_SCALAR_INIT,
7474
JSON_SEM_SCALAR_CALL,
75-
} JsonParserSem;
75+
};
7676

7777
/*
7878
* struct containing the 3 stacks used in non-recursive parsing,

src/tools/pgindent/typedefs.list

-2
Original file line numberDiff line numberDiff line change
@@ -1312,14 +1312,12 @@ JsonManifestParseIncrementalState
13121312
JsonManifestParseState
13131313
JsonManifestSemanticState
13141314
JsonManifestWALRangeField
1315-
JsonNonTerminal
13161315
JsonObjectAgg
13171316
JsonObjectConstructor
13181317
JsonOutput
13191318
JsonParseExpr
13201319
JsonParseContext
13211320
JsonParseErrorType
1322-
JsonParserSem
13231321
JsonParserStack
13241322
JsonPath
13251323
JsonPathBool

0 commit comments

Comments
 (0)