Mercurial > projects > ddmd
annotate dmd/StringEntry.d @ 174:af724d3510d7
lot os toCBuffer methods implemented
moved shared Type.* stuff into Global
author | korDen |
---|---|
date | Sun, 10 Oct 2010 03:47:23 +0400 |
parents | e28b18c23469 |
children | e3afd1303184 |
rev | line source |
---|---|
0 | 1 module dmd.StringEntry; |
2 | |
114 | 3 import dmd.common; |
0 | 4 import dmd.StringValue; |
5 import dmd.Dchar; | |
6 import dmd.Lstring; | |
7 | |
8 import core.stdc.stdlib; | |
9 | |
10 struct StringEntry | |
11 { | |
12 StringEntry* left; | |
13 StringEntry* right; | |
14 hash_t hash; | |
15 | |
16 StringValue value; | |
174 | 17 |
18 this(StringEntry* other) | |
19 { | |
20 hash = other.hash; | |
21 value = other.value; | |
22 } | |
0 | 23 |
24 this(immutable(dchar_t)[] s) | |
25 { | |
26 hash = Dchar.calcHash(s.ptr, s.length); | |
27 value.lstring.string_ = s; | |
28 } | |
174 | 29 } |