view dmd/backend/LIST.d @ 0:10317f0c89a5

Initial commit
author korDen
date Sat, 24 Oct 2009 08:42:06 +0400
parents
children 5c9b78899f5d
line wrap: on
line source

module dmd.backend.LIST;

import dmd.backend.Symbol;

struct LIST
{
	/* Do not access items in this struct directly, use the		*/
	/* functions designed for that purpose.				*/
	LIST* next;	/* next element in list			*/
	int count;		/* when 0, element may be deleted	*/

	union
	{
		void *ptr;	/* data pointer				*/
		int data;
	}
}

alias LIST* list_t;			/* pointer to a list entry		*/
alias list_t symlist_t;		/* pointer to a list entry		*/

extern (C++) extern {
	__gshared list_t slist;
	list_t list_prepend(list_t* plist, void* ptr);
	void slist_add(Symbol* s);
}