annotate dmd/StringEntry.d @ 191:52188e7e3fb5
Fixed deprecated features, now compiles with DMD2.058
Also changed Array allocation policy:
Now doesn't reallocate but malloc's, followed by a memcpy (no free).
(this fixes a crash while compiling druntime. Same bug in dmd)
author |
korDen@korDen-pc |
date |
Sun, 25 Mar 2012 03:11:12 +0400 |
parents |
e3afd1303184 |
children |
|
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;
|
|
17
|
|
18 this(immutable(dchar_t)[] s)
|
|
19 {
|
|
20 hash = Dchar.calcHash(s.ptr, s.length);
|
|
21 }
|
174
|
22 }
|