mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Use JsonbIteratorToken consistently in automatic variable declarations.
Many functions stored JsonbIteratorToken values in variables of other integer types. Also, standardize order relative to other declarations. Expect compilers to generate the same code before and after this change.
This commit is contained in:
@ -455,8 +455,8 @@ JsonbToCStringWorker(StringInfo out, JsonbContainer *in, int estimated_len, bool
|
||||
{
|
||||
bool first = true;
|
||||
JsonbIterator *it;
|
||||
JsonbIteratorToken type = WJB_DONE;
|
||||
JsonbValue v;
|
||||
JsonbIteratorToken type = WJB_DONE;
|
||||
int level = 0;
|
||||
bool redo_switch = false;
|
||||
|
||||
@ -899,7 +899,6 @@ datum_to_jsonb(Datum val, bool is_null, JsonbInState *result,
|
||||
case JSONBTYPE_JSONB:
|
||||
{
|
||||
Jsonb *jsonb = DatumGetJsonb(val);
|
||||
JsonbIteratorToken type;
|
||||
JsonbIterator *it;
|
||||
|
||||
it = JsonbIteratorInit(&jsonb->root);
|
||||
@ -913,6 +912,8 @@ datum_to_jsonb(Datum val, bool is_null, JsonbInState *result,
|
||||
}
|
||||
else
|
||||
{
|
||||
JsonbIteratorToken type;
|
||||
|
||||
while ((type = JsonbIteratorNext(&it, &jb, false))
|
||||
!= WJB_DONE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user