hmm, forgot a chunk :P

This commit is contained in:
Bill Currie 2003-04-07 20:15:38 +00:00
parent 7001f1d851
commit 72036d76b0

View file

@ -158,11 +158,24 @@ bi_plist_clear (progs_t *pr, void *data)
Hash_FlushTable (res->items); Hash_FlushTable (res->items);
} }
static unsigned long
plist_get_hash (void *key, void *unused)
{
return (unsigned long) key;
}
static int
plist_compare (void *k1, void *k2, void *unused)
{
return k1 == k2;
}
void void
Plist_Progs_Init (progs_t *pr) Plist_Progs_Init (progs_t *pr)
{ {
plist_resources_t *res = malloc (sizeof (plist_resources_t)); plist_resources_t *res = malloc (sizeof (plist_resources_t));
res->plist = PL_NewArray (); res->items = Hash_NewTable (1021, 0, 0, 0);
Hash_SetHashCompare (res->items, plist_get_hash, plist_compare);
PR_Resources_Register (pr, "plist", res, bi_plist_clear); PR_Resources_Register (pr, "plist", res, bi_plist_clear);
PR_AddBuiltin (pr, "PL_GetPropertyList", bi_PL_GetPropertyList, -1); PR_AddBuiltin (pr, "PL_GetPropertyList", bi_PL_GetPropertyList, -1);