slang: Get rid of the old syntax file and utilities.
[mesa.git] / src / mesa / shader / slang / slang_utility.c
index 786b8990dfea052641c4ba58a2a6c43ffb3ccefd..3631e32b3c38eedde95760a407ae37b0a74a11bf 100644 (file)
@@ -28,7 +28,7 @@
  * \author Michal Krol
  */
 
-#include "imports.h"
+#include "main/imports.h"
 #include "slang_utility.h"
 #include "slang_mem.h"
 
@@ -153,16 +153,9 @@ slang_atom_pool_destruct (slang_atom_pool * pool)
                
       entry = pool->entries[i];
       while (entry != NULL) {
-         slang_atom_entry *next;
-
-         next = entry->next;
-#if USE_MEMPOOL
+         slang_atom_entry *next = entry->next;
          _slang_free(entry->id);
          _slang_free(entry);
-#else
-         slang_alloc_free(entry->id);
-         slang_alloc_free(entry);
-#endif
          entry = next;
       }
    }
@@ -210,11 +203,7 @@ slang_atom_pool_atom(slang_atom_pool * pool, const char * id)
    /* Okay, we have not found an atom. Create a new entry for it.
     * Note that the <entry> points to the last entry's <next> field.
     */
-#if USE_MEMPOOL
-   *entry = (slang_atom_entry *) (_slang_alloc(sizeof(slang_atom_entry)));
-#else
-   *entry = (slang_atom_entry *) (slang_alloc_malloc(sizeof(slang_atom_entry)));
-#endif
+   *entry = (slang_atom_entry *) _slang_alloc(sizeof(slang_atom_entry));
    if (*entry == NULL)
       return SLANG_ATOM_NULL;
 
@@ -223,11 +212,7 @@ slang_atom_pool_atom(slang_atom_pool * pool, const char * id)
     * value.
     */
    (**entry).next = NULL;
-#if USE_MEMPOOL
    (**entry).id = _slang_strdup(id);
-#else
-   (**entry).id = slang_string_duplicate(id);
-#endif
    if ((**entry).id == NULL)
       return SLANG_ATOM_NULL;
    return (slang_atom) (**entry).id;