aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2015-10-11 23:53:35 -0400
committerNoah Misch <noah@leadboat.com>2015-10-12 10:12:44 -0400
commit22c5705f81717dd0622ebfb13a617e6104d1fbd9 (patch)
tree75f5a3c90ddb5ea121cccc1759f9cf2807d8c1a6 /src/backend/utils/adt/jsonfuncs.c
parentc9853e647f247e0bbae1294b24fac40ec7c34550 (diff)
downloadpostgresql-22c5705f81717dd0622ebfb13a617e6104d1fbd9.tar.gz
postgresql-22c5705f81717dd0622ebfb13a617e6104d1fbd9.zip
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.
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
-rw-r--r--src/backend/utils/adt/jsonfuncs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index 1a9a060d4eb..b49a5dd61e4 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -255,7 +255,7 @@ jsonb_object_keys(PG_FUNCTION_ARGS)
bool skipNested = false;
JsonbIterator *it;
JsonbValue v;
- int r;
+ JsonbIteratorToken r;
if (JB_ROOT_IS_SCALAR(jb))
ereport(ERROR,
@@ -1195,7 +1195,7 @@ get_jsonb_path_all(FunctionCallInfo fcinfo, bool as_text)
if (jbvp->type == jbvBinary)
{
JsonbIterator *it = JsonbIteratorInit((JsonbContainer *) jbvp->val.binary.data);
- int r;
+ JsonbIteratorToken r;
r = JsonbIteratorNext(&it, &tv, true);
container = (JsonbContainer *) jbvp->val.binary.data;
@@ -1368,7 +1368,7 @@ each_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname, bool as_text)
bool skipNested = false;
JsonbIterator *it;
JsonbValue v;
- int r;
+ JsonbIteratorToken r;
if (!JB_ROOT_IS_OBJECT(jb))
ereport(ERROR,
@@ -1687,7 +1687,7 @@ elements_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname,
bool skipNested = false;
JsonbIterator *it;
JsonbValue v;
- int r;
+ JsonbIteratorToken r;
if (JB_ROOT_IS_SCALAR(jb))
ereport(ERROR,
@@ -2704,7 +2704,7 @@ populate_recordset_worker(FunctionCallInfo fcinfo, const char *funcname,
JsonbIterator *it;
JsonbValue v;
bool skipNested = false;
- int r;
+ JsonbIteratorToken r;
Assert(jtype == JSONBOID);