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

Commit4c51772

Browse files
author
Nikita Glukhov
committed
Export appendToBuffer(), reserveFromBuffer()
1 parent7ad2220 commit4c51772

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/backend/utils/adt/jsonb_util.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ static void convertJsonbArray(StringInfo buffer, JEntry *header, const JsonbValu
8282
staticvoidconvertJsonbObject(StringInfobuffer,JEntry*header,constJsonbValue*val,intlevel);
8383
staticvoidconvertJsonbScalar(StringInfobuffer,JEntry*header,constJsonbValue*scalarVal);
8484

85-
staticintreserveFromBuffer(StringInfobuffer,intlen);
86-
staticvoidappendToBuffer(StringInfobuffer,constchar*data,intlen);
8785
staticvoidcopyToBuffer(StringInfobuffer,intoffset,constchar*data,intlen);
8886
staticshortpadBufferToInt(StringInfobuffer);
8987

@@ -1426,7 +1424,7 @@ compareJsonbScalarValue(const JsonbValue *aScalar, const JsonbValue *bScalar)
14261424
* Returns the offset to the reserved area. The caller is expected to fill
14271425
* the reserved area later with copyToBuffer().
14281426
*/
1429-
staticint
1427+
int
14301428
reserveFromBuffer(StringInfobuffer,intlen)
14311429
{
14321430
intoffset;
@@ -1461,7 +1459,7 @@ copyToBuffer(StringInfo buffer, int offset, const char *data, int len)
14611459
/*
14621460
* A shorthand for reserveFromBuffer + copyToBuffer.
14631461
*/
1464-
staticvoid
1462+
void
14651463
appendToBuffer(StringInfobuffer,constchar*data,intlen)
14661464
{
14671465
intoffset;

‎src/include/utils/jsonb.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ extern bool JsonbDeepContains(JsonbIterator **val,
340340
JsonbIterator**mContained);
341341
externvoidJsonbHashScalarValue(constJsonbValue*scalarVal,uint32*hash);
342342

343+
externintreserveFromBuffer(StringInfobuffer,intlen);
344+
externvoidappendToBuffer(StringInfobuffer,constchar*data,intlen);
343345
/* jsonb.c support functions */
344346
externchar*JsonbToCString(StringInfoout,JsonbContainer*in,
345347
intestimated_len);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp