Content-Length: 273750 | pFad | http://github.com/postgrespro/postgres/commit/23116d5437d0e8d077e7fd5391f5fa0fc781b7d2

2C Add a bit more commentary about regex's colormap tree data structure. · postgrespro/postgres@23116d5 · GitHub
Skip to content

Commit 23116d5

Browse files
committed
Add a bit more commentary about regex's colormap tree data structure.
Per an off-list question from Piotr Stefaniak.
1 parent 91e7926 commit 23116d5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/include/regex/regguts.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ typedef int pcolor; /* what color promotes to */
162162
* deep (in the past it was shallower during construction but was "filled"
163163
* to full depth at the end of that); areas that are unaltered as yet point
164164
* to "fill blocks" which are entirely WHITE in color.
165+
*
166+
* Leaf-level tree blocks are of type "struct colors", while upper-level
167+
* blocks are of type "struct ptrs". Pointers into the tree are generally
168+
* declared as "union tree *" to be agnostic about what level they point to.
165169
*/
166170

167171
/* the tree itself */
@@ -179,6 +183,7 @@ union tree
179183
struct ptrs ptrs;
180184
};
181185

186+
/* use these pseudo-field names when dereferencing a "union tree" pointer */
182187
#define tcolor colors.ccolor
183188
#define tptr ptrs.pptr
184189

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/23116d5437d0e8d077e7fd5391f5fa0fc781b7d2

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy