Skip to content

Commit 5cd7b7e

Browse files
author
Nikita Glukhov
committed
Remove JsonCopyTemporary()
1 parent fda6461 commit 5cd7b7e

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

src/backend/utils/adt/json_generic.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,6 @@ JsonFree(Json *json)
138138
pfree(json);
139139
}
140140

141-
Json *
142-
JsonCopyTemporary(Json *tmp)
143-
{
144-
Json *json = (Json *) palloc(sizeof(Json));
145-
146-
memcpy(json, tmp, sizeof(Json));
147-
tmp->obj.freeValue = false;
148-
json->obj.isTemporary = false;
149-
150-
return json;
151-
}
152-
153141
Json *
154142
JsonValueToJson(JsonValue *val)
155143
{

src/include/utils/json_generic.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,6 @@ JsonIteratorFree(JsonIterator *it)
218218
it = JsonIteratorFreeAndGetParent(it);
219219
}
220220

221-
static inline Json *
222-
JsonGetNonTemporary(Json *json)
223-
{
224-
return JsonIsTemporary(json) ? JsonCopyTemporary(json) : json;
225-
}
226-
227221
extern Json *JsonValueToJson(JsonValue *val);
228222
extern JsonValue *JsonToJsonValue(Json *json, JsonValue *jv);
229223
extern JsonValue *JsonValueUnpackBinary(const JsonValue *jbv);

0 commit comments

Comments
 (0)