aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_utility.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-11-16 23:34:02 +0000
committerBrian Paul <[email protected]>2006-11-16 23:34:02 +0000
commit7984c70070ea3fee1600095b1f32b0f8adf2ad31 (patch)
treed85f7629d8f53e470620983e3d92244b15724d34 /src/mesa/shader/slang/slang_utility.c
parent523f5cfeb537e52baa892148b7b050fb076ef1b0 (diff)
revert prev check-in
Diffstat (limited to 'src/mesa/shader/slang/slang_utility.c')
-rw-r--r--src/mesa/shader/slang/slang_utility.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c
index 28837248df5..54fcc8a2382 100644
--- a/src/mesa/shader/slang/slang_utility.c
+++ b/src/mesa/shader/slang/slang_utility.c
@@ -160,16 +160,11 @@ void slang_atom_pool_destruct (slang_atom_pool *pool)
}
}
-/**
- * Search atom pool for atom with the given name.
- * If name is not found, create new atom (but don't insert into pool?)
- */
-slang_atom slang_atom_pool_atom (const slang_atom_pool *pool, const char *id)
+slang_atom slang_atom_pool_atom (slang_atom_pool *pool, const char *id)
{
GLuint hash;
const char *p = id;
- slang_atom_entry * const * entry;
- slang_atom_entry **newEntry = NULL;
+ slang_atom_entry **entry;
hash = 0;
while (*p != '\0')
@@ -192,15 +187,15 @@ slang_atom slang_atom_pool_atom (const slang_atom_pool *pool, const char *id)
entry = &(**entry).next;
}
- *newEntry = (slang_atom_entry *) slang_alloc_malloc (sizeof (slang_atom_entry));
- if (*newEntry == NULL)
+ *entry = (slang_atom_entry *) slang_alloc_malloc (sizeof (slang_atom_entry));
+ if (*entry == NULL)
return SLANG_ATOM_NULL;
- (**newEntry).next = NULL;
- (**newEntry).id = slang_string_duplicate (id);
- if ((**newEntry).id == NULL)
+ (**entry).next = NULL;
+ (**entry).id = slang_string_duplicate (id);
+ if ((**entry).id == NULL)
return SLANG_ATOM_NULL;
- return (slang_atom) (**newEntry).id;
+ return (slang_atom) (**entry).id;
}
const char *slang_atom_pool_id (slang_atom_pool *pool, slang_atom atom)