mirror of
https://github.com/postgres/postgres.git
synced 2025-05-17 06:41:24 +03:00
Separate enum from struct
Otherwise the enum symbols are not visible outside the struct in C++. Reviewed-by: Thomas Munro <thomas.munro@enterprisedb.com>
This commit is contained in:
parent
0665023b44
commit
330b48b94b
@ -219,6 +219,20 @@ typedef struct
|
|||||||
#define JB_ROOT_IS_ARRAY(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FARRAY)
|
#define JB_ROOT_IS_ARRAY(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FARRAY)
|
||||||
|
|
||||||
|
|
||||||
|
enum jbvType
|
||||||
|
{
|
||||||
|
/* Scalar types */
|
||||||
|
jbvNull = 0x0,
|
||||||
|
jbvString,
|
||||||
|
jbvNumeric,
|
||||||
|
jbvBool,
|
||||||
|
/* Composite types */
|
||||||
|
jbvArray = 0x10,
|
||||||
|
jbvObject,
|
||||||
|
/* Binary (i.e. struct Jsonb) jbvArray/jbvObject */
|
||||||
|
jbvBinary
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* JsonbValue: In-memory representation of Jsonb. This is a convenient
|
* JsonbValue: In-memory representation of Jsonb. This is a convenient
|
||||||
* deserialized representation, that can easily support using the "val"
|
* deserialized representation, that can easily support using the "val"
|
||||||
@ -227,19 +241,7 @@ typedef struct
|
|||||||
*/
|
*/
|
||||||
struct JsonbValue
|
struct JsonbValue
|
||||||
{
|
{
|
||||||
enum
|
jbvType type; /* Influences sort order */
|
||||||
{
|
|
||||||
/* Scalar types */
|
|
||||||
jbvNull = 0x0,
|
|
||||||
jbvString,
|
|
||||||
jbvNumeric,
|
|
||||||
jbvBool,
|
|
||||||
/* Composite types */
|
|
||||||
jbvArray = 0x10,
|
|
||||||
jbvObject,
|
|
||||||
/* Binary (i.e. struct Jsonb) jbvArray/jbvObject */
|
|
||||||
jbvBinary
|
|
||||||
} type; /* Influences sort order */
|
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user