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

Commit23116d5

Browse files
committed
Add a bit more commentary about regex's colormap tree data structure.
Per an off-list question from Piotr Stefaniak.
1 parent91e7926 commit23116d5

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
structptrsptrs;
180184
};
181185

186+
/* use these pseudo-field names when dereferencing a "union tree" pointer */
182187
#definetcolorcolors.ccolor
183188
#definetptrptrs.pptr
184189

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp