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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
1 module dmd.StringEntry;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
114
e28b18c23469 added a module dmd.common for commonly used stuff
Trass3r
parents: 0
diff changeset
3 import dmd.common;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 import dmd.StringValue;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5 import dmd.Dchar;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 import dmd.Lstring;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8 import core.stdc.stdlib;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10 struct StringEntry
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 StringEntry* left;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 StringEntry* right;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 hash_t hash;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 StringValue value;
174
af724d3510d7 lot os toCBuffer methods implemented
korDen
parents: 114
diff changeset
17
af724d3510d7 lot os toCBuffer methods implemented
korDen
parents: 114
diff changeset
18 this(StringEntry* other)
af724d3510d7 lot os toCBuffer methods implemented
korDen
parents: 114
diff changeset
19 {
af724d3510d7 lot os toCBuffer methods implemented
korDen
parents: 114
diff changeset
20 hash = other.hash;
af724d3510d7 lot os toCBuffer methods implemented
korDen
parents: 114
diff changeset
21 value = other.value;
af724d3510d7 lot os toCBuffer methods implemented
korDen
parents: 114
diff changeset
22 }
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24 this(immutable(dchar_t)[] s)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
25 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
26 hash = Dchar.calcHash(s.ptr, s.length);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 value.lstring.string_ = s;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 }
174
af724d3510d7 lot os toCBuffer methods implemented
korDen
parents: 114
diff changeset
29 }