Skip to content

Commit c07693f

Browse files
committed
Remove remnants of a JENTRY_ISFIRST flag bit.
I removed the flag earlier, but missed a few references in jsonb.h.
1 parent f669b61 commit c07693f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/include/utils/jsonb.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,9 @@ typedef struct JsonbValue JsonbValue;
104104
* To encode the length and offset of the variable-length portion of each
105105
* node in a compact way, the JEntry stores only the end offset within the
106106
* variable-length portion of the container node. For the first JEntry in the
107-
* container's JEntry array, that equals to the length of the node data. For
108-
* convenience, the JENTRY_ISFIRST flag is set. The begin offset and length
109-
* of the rest of the entries can be calculated using the end offset of the
110-
* previous JEntry in the array.
107+
* container's JEntry array, that equals to the length of the node data. The
108+
* begin offset and length of the rest of the entries can be calculated using
109+
* the end offset of the previous JEntry in the array.
111110
*
112111
* Overall, the Jsonb struct requires 4-bytes alignment. Within the struct,
113112
* the variable-length portion of some node types is aligned to a 4-byte
@@ -124,7 +123,7 @@ typedef struct JsonbValue JsonbValue;
124123
* The least significant 28 bits store the end offset of the entry (see
125124
* JBE_ENDPOS, JBE_OFF, JBE_LEN macros below). The next three bits
126125
* are used to store the type of the entry. The most significant bit
127-
* is set on the first entry in an array of JEntrys.
126+
* is unused, and should be set to zero.
128127
*/
129128
typedef uint32 JEntry;
130129

@@ -140,7 +139,6 @@ typedef uint32 JEntry;
140139
#define JENTRY_ISCONTAINER 0x50000000 /* array or object */
141140

142141
/* Note possible multiple evaluations */
143-
#define JBE_ISFIRST(je_) (((je_) & JENTRY_ISFIRST) != 0)
144142
#define JBE_ISSTRING(je_) (((je_) & JENTRY_TYPEMASK) == JENTRY_ISSTRING)
145143
#define JBE_ISNUMERIC(je_) (((je_) & JENTRY_TYPEMASK) == JENTRY_ISNUMERIC)
146144
#define JBE_ISCONTAINER(je_) (((je_) & JENTRY_TYPEMASK) == JENTRY_ISCONTAINER)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy