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

Commit05ca48f

Browse files
author
Nikita Glukhov
committed
Export appendToBuffer(), reserveFromBuffer()
1 parent59f29e4 commit05ca48f

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
@@ -86,8 +86,6 @@ static void convertJsonbArray(StringInfo buffer, JEntry *header, const JsonbValu
8686
staticvoidconvertJsonbObject(StringInfobuffer,JEntry*header,constJsonbValue*val,intlevel);
8787
staticvoidconvertJsonbScalar(StringInfobuffer,JEntry*header,constJsonbValue*scalarVal);
8888

89-
staticintreserveFromBuffer(StringInfobuffer,intlen);
90-
staticvoidappendToBuffer(StringInfobuffer,constchar*data,intlen);
9189
staticvoidcopyToBuffer(StringInfobuffer,intoffset,constchar*data,intlen);
9290
staticshortpadBufferToInt(StringInfobuffer);
9391

@@ -1514,7 +1512,7 @@ compareJsonbScalarValue(const JsonbValue *aScalar, const JsonbValue *bScalar)
15141512
* Returns the offset to the reserved area. The caller is expected to fill
15151513
* the reserved area later with copyToBuffer().
15161514
*/
1517-
staticint
1515+
int
15181516
reserveFromBuffer(StringInfobuffer,intlen)
15191517
{
15201518
intoffset;
@@ -1549,7 +1547,7 @@ copyToBuffer(StringInfo buffer, int offset, const char *data, int len)
15491547
/*
15501548
* A shorthand for reserveFromBuffer + copyToBuffer.
15511549
*/
1552-
staticvoid
1550+
void
15531551
appendToBuffer(StringInfobuffer,constchar*data,intlen)
15541552
{
15551553
intoffset;

‎src/include/utils/jsonb.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ extern void JsonbHashScalarValue(const JsonbValue *scalarVal, uint32 *hash);
368368
externvoidJsonbHashScalarValueExtended(constJsonbValue*scalarVal,
369369
uint64*hash,uint64seed);
370370

371+
externintreserveFromBuffer(StringInfobuffer,intlen);
372+
externvoidappendToBuffer(StringInfobuffer,constchar*data,intlen);
371373
/* jsonb.c support functions */
372374
externchar*JsonbToCString(StringInfoout,JsonbContainer*in,
373375
intestimated_len);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp