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

Commit330b48b

Browse files
committed
Separate enum from struct
Otherwise the enum symbols are not visible outside the struct in C++.Reviewed-by: Thomas Munro <thomas.munro@enterprisedb.com>
1 parent0665023 commit330b48b

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

‎src/include/utils/jsonb.h

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,20 @@ typedef struct
219219
#defineJB_ROOT_IS_ARRAY(jbp_)( *(uint32*) VARDATA(jbp_) & JB_FARRAY)
220220

221221

222+
enumjbvType
223+
{
224+
/* Scalar types */
225+
jbvNull=0x0,
226+
jbvString,
227+
jbvNumeric,
228+
jbvBool,
229+
/* Composite types */
230+
jbvArray=0x10,
231+
jbvObject,
232+
/* Binary (i.e. struct Jsonb) jbvArray/jbvObject */
233+
jbvBinary
234+
};
235+
222236
/*
223237
* JsonbValue:In-memory representation of Jsonb. This is a convenient
224238
* deserialized representation, that can easily support using the "val"
@@ -227,19 +241,7 @@ typedef struct
227241
*/
228242
structJsonbValue
229243
{
230-
enum
231-
{
232-
/* Scalar types */
233-
jbvNull=0x0,
234-
jbvString,
235-
jbvNumeric,
236-
jbvBool,
237-
/* Composite types */
238-
jbvArray=0x10,
239-
jbvObject,
240-
/* Binary (i.e. struct Jsonb) jbvArray/jbvObject */
241-
jbvBinary
242-
}type;/* Influences sort order */
244+
jbvTypetype;/* Influences sort order */
243245

244246
union
245247
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp