1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Fix warnings re typedef redefinition in ea7b4e9a2a and 3311ea86ed

Per gripe from Tom Lane and the buildfarm
This commit is contained in:
Andrew Dunstan
2024-04-04 11:27:51 -04:00
parent 6f4d63e989
commit 1b00fe30a6
2 changed files with 11 additions and 6 deletions

View File

@ -78,8 +78,10 @@ typedef enum
* struct containing the 3 stacks used in non-recursive parsing, * struct containing the 3 stacks used in non-recursive parsing,
* and the token and value for scalars that need to be preserved * and the token and value for scalars that need to be preserved
* across calls. * across calls.
*
* typedef appears in jsonapi.h
*/ */
typedef struct JsonParserStack struct JsonParserStack
{ {
int stack_size; int stack_size;
char *prediction; char *prediction;
@ -89,18 +91,20 @@ typedef struct JsonParserStack
bool *fnull; bool *fnull;
JsonTokenType scalar_tok; JsonTokenType scalar_tok;
char *scalar_val; char *scalar_val;
} JsonParserStack; };
/* /*
* struct containing state used when there is a possible partial token at the * struct containing state used when there is a possible partial token at the
* end of a json chunk when we are doing incremental parsing. * end of a json chunk when we are doing incremental parsing.
*
* typedef appears in jsonapi.h
*/ */
typedef struct JsonIncrementalState struct JsonIncrementalState
{ {
bool is_last_chunk; bool is_last_chunk;
bool partial_completed; bool partial_completed;
StringInfoData partial_token; StringInfoData partial_token;
} JsonIncrementalState; };
/* /*
* constants and macros used in the nonrecursive parser * constants and macros used in the nonrecursive parser

View File

@ -91,12 +91,13 @@ typedef struct
char *manifest_checksum; char *manifest_checksum;
} JsonManifestParseState; } JsonManifestParseState;
typedef struct JsonManifestParseIncrementalState /* typedef appears in parse_manifest.h */
struct JsonManifestParseIncrementalState
{ {
JsonLexContext lex; JsonLexContext lex;
JsonSemAction sem; JsonSemAction sem;
pg_cryptohash_ctx *manifest_ctx; pg_cryptohash_ctx *manifest_ctx;
} JsonManifestParseIncrementalState; };
static JsonParseErrorType json_manifest_object_start(void *state); static JsonParseErrorType json_manifest_object_start(void *state);
static JsonParseErrorType json_manifest_object_end(void *state); static JsonParseErrorType json_manifest_object_end(void *state);