Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite00b4f7

Browse files
committed
Remove redundant JSON parser typedefs
JsonNonTerminal and JsonParserSem were added in commit3311ea8These names of these two enums are not actually used, so there is noneed for typedefs. Instead use plain enums to declare the constants.Noticed by Alvaro Herera.
1 parented52df3 commite00b4f7

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

‎src/common/jsonapi.c

Lines changed: 4 additions & 4 deletions
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-
typedefenum
53+
enumJsonNonTerminal
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-
typedefenum
62+
enumJsonParserSem
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

Lines changed: 0 additions & 2 deletions
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)

[8]ページ先頭

©2009-2025 Movatter.jp