glsl: Don't bother unsetting a destructor that was never set.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 15 Jan 2011 23:25:02 +0000 (15:25 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 20 Jan 2011 07:40:33 +0000 (23:40 -0800)
This was totally copied and pasted from glsl_symbol_table.

src/glsl/glsl_symbol_table.cpp

index 3dcd928016ac1b1c5c7af45d4a6e5e8b0ac26e63..6fcfe07b9c2184a439920ea62c6c32d232a32d86 100644 (file)
@@ -35,13 +35,10 @@ public:
       return entry;
    }
 
-   /* If the user *does* call delete, that's OK, we will just
-    * talloc_free in that case. Here, C++ will have already called the
-    * destructor so tell talloc not to do that again. */
-   static void operator delete(void *table)
+   /* If the user *does* call delete, that's OK, we will just talloc_free. */
+   static void operator delete(void *entry)
    {
-      talloc_set_destructor(table, NULL);
-      talloc_free(table);
+      talloc_free(entry);
    }
 
    symbol_table_entry(ir_variable *v)                     : v(v), f(0), t(0) {}