Commit 330b48b9 authored by Peter Eisentraut's avatar Peter Eisentraut

Separate enum from struct

Otherwise the enum symbols are not visible outside the struct in C++.
Reviewed-by: default avatarThomas Munro <thomas.munro@enterprisedb.com>
parent 0665023b
......@@ -219,16 +219,8 @@ typedef struct
#define JB_ROOT_IS_ARRAY(jbp_) ( *(uint32*) VARDATA(jbp_) & JB_FARRAY)
/*
* JsonbValue: In-memory representation of Jsonb. This is a convenient
* deserialized representation, that can easily support using the "val"
* union across underlying types during manipulation. The Jsonb on-disk
* representation has various alignment considerations.
*/
struct JsonbValue
enum jbvType
{
enum
{
/* Scalar types */
jbvNull = 0x0,
jbvString,
......@@ -239,7 +231,17 @@ struct JsonbValue
jbvObject,
/* Binary (i.e. struct Jsonb) jbvArray/jbvObject */
jbvBinary
} type; /* Influences sort order */
};
/*
* JsonbValue: In-memory representation of Jsonb. This is a convenient
* deserialized representation, that can easily support using the "val"
* union across underlying types during manipulation. The Jsonb on-disk
* representation has various alignment considerations.
*/
struct JsonbValue
{
jbvType type; /* Influences sort order */
union
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment