view dmd/StringEntry.d @ 144:ea6325d0edd9

+ RealExp.toCBuffer
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Tue, 14 Sep 2010 22:39:29 +0100
parents e28b18c23469
children af724d3510d7
line wrap: on
line source

module dmd.StringEntry;

import dmd.common;
import dmd.StringValue;
import dmd.Dchar;
import dmd.Lstring;

import core.stdc.stdlib;

struct StringEntry
{
    StringEntry* left;
    StringEntry* right;
    hash_t hash;

    StringValue value;

	this(immutable(dchar_t)[] s)
	{
		hash = Dchar.calcHash(s.ptr, s.length);
		value.lstring.string_ = s;
	}
}