diff options
| author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2020-03-19 21:14:42 +0000 |
|---|---|---|
| committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2020-03-22 02:23:52 +0000 |
| commit | 4960699de2fd010598d14d59f4bcd3d9b48ec46b (patch) | |
| tree | 22e266288bbf1ab09035c79989e727190a87f13f /Src/zsh.h | |
| parent | 45583/0002: internal: Reduce some variables' visibility. No functional change. (diff) | |
| download | zsh-4960699de2fd010598d14d59f4bcd3d9b48ec46b.tar zsh-4960699de2fd010598d14d59f4bcd3d9b48ec46b.tar.gz zsh-4960699de2fd010598d14d59f4bcd3d9b48ec46b.tar.bz2 zsh-4960699de2fd010598d14d59f4bcd3d9b48ec46b.tar.lz zsh-4960699de2fd010598d14d59f4bcd3d9b48ec46b.tar.xz zsh-4960699de2fd010598d14d59f4bcd3d9b48ec46b.tar.zst zsh-4960699de2fd010598d14d59f4bcd3d9b48ec46b.zip | |
45583/0003: internal: Add some comments around Eccstr. No functional change.
Diffstat (limited to 'Src/zsh.h')
| -rw-r--r-- | Src/zsh.h | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -832,13 +832,33 @@ struct estate { char *strs; /* strings from prog */ }; +/* + * A binary tree of strings. + * + * Refer to the "Word code." comment at the top of Src/parse.c for details. + */ typedef struct eccstr *Eccstr; - struct eccstr { + /* Child pointers. */ Eccstr left, right; + + /* String; pointer into to estate::strs. */ char *str; - wordcode offs, aoffs; + + /* Wordcode of a long string, as described in the Src/parse.c comment. */ + wordcode offs; + + /* Raw memory offset of str in estate::strs. */ + wordcode aoffs; + + /* + * ### The number of starts and ends of function definitions up to this point. + * + * String reuse may only happen between strings that have the same "nfunc" value. + */ int nfunc; + + /* Hash of str. */ int hashval; }; |
