view dmd/StringEntry.d @ 176:fa9a71a9f5a8

Moved all the mutable globals to Global
author korDen
date Sun, 10 Oct 2010 05:22:45 +0400
parents af724d3510d7
children e3afd1303184
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(StringEntry* other)
	{
		hash = other.hash;
		value = other.value;
	}

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